Skip to content

Commit

Permalink
plots: Properly pass keyword arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
hagau committed Jan 22, 2025
1 parent 907fe67 commit 3ce5ff9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down Expand Up @@ -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'}
Expand Down

0 comments on commit 3ce5ff9

Please sign in to comment.