From 3ce5ff9c9712802dbf352918947d7f535cf40c96 Mon Sep 17 00:00:00 2001 From: Christian Hagau Date: Wed, 22 Jan 2025 14:42:32 +0100 Subject: [PATCH] plots: Properly pass keyword arguments --- plots.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plots.py b/plots.py index 95bcaa1..12b18cb 100644 --- a/plots.py +++ b/plots.py @@ -584,7 +584,7 @@ def distributionplot(plot_type): , x=self.x, y=self.y , hue=self.hue , row=self.row, column=self.column - , kwargs=self.plot_kwargs + , **self.plot_kwargs ) def catplot(plot_type): @@ -593,25 +593,27 @@ def catplot(plot_type): , x=self.x, y=self.y , hue=self.hue , row=self.row, column=self.column - , kwargs=self.plot_kwargs + , **self.plot_kwargs ) def relplot(plot_type): return self.plot_relplot(df=selected_data , plot_type=plot_type , x=self.x, y=self.y - , hue=self.hue, style=self.style, size=self.size + , hue=self.hue , row=self.row, column=self.column - , kwargs=self.plot_kwargs + , style=self.style, size=self.size + , **self.plot_kwargs ) def heatplot(plot_type): return self.plot_heatplot(df=selected_data , plot_type=plot_type , x=self.x, y=self.y, z=self.z - , hue=self.hue, style=self.style + , hue=self.hue , row=self.row, column=self.column - , kwargs=self.plot_kwargs + , style=self.style + , **self.plot_kwargs ) fig = None @@ -836,7 +838,7 @@ def add_props(propname, full_key, value): return kwargs - def set_plot_specific_options(self, plot_type:str, kwargs:dict): + def set_plot_specific_options(self, plot_type:str, **kwargs:dict): # defaults, can be overridden by the matplotlib.rc boxprops = {'edgecolor': 'black'} medianprops = {'color':'red'}