Skip to content

Commit

Permalink
Rename param
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman committed Dec 29, 2023
1 parent fde166e commit 8d6a740
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions upsetplot/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ def plot_shading(self, ax):

def style_categories(
self,
category_names,
categories,
*,
bar_facecolor=None,
bar_hatch=None,
Expand All @@ -1013,8 +1013,8 @@ def style_categories(
Parameters
----------
category_names : str or list[str] category names.
Axes names where the changed style is applied.
categories : str or list[str]
Category names where the changed style applies.
bar_facecolor : str or RGBA matplotlib color tuple, optional.
Override the default facecolor in the totals plot.
bar_hatch : str, optional
Expand All @@ -1034,8 +1034,8 @@ def style_categories(
shading_linestyle : str, optional
Line style for edges.
"""
if isinstance(category_names, str):
category_names = [category_names]
if isinstance(categories, str):
categories = [categories]
style = {
"bar_facecolor": bar_facecolor,
"bar_hatch": bar_hatch,
Expand All @@ -1048,7 +1048,7 @@ def style_categories(
"shading_linestyle": shading_linestyle,
}
style = {k: v for k, v in style.items() if v is not None}
for category_name in category_names:
for category_name in categories:
self.category_styles.setdefault(category_name, {}).update(style)

def plot(self, fig=None):
Expand Down

0 comments on commit 8d6a740

Please sign in to comment.