Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions upsetplot/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ def _plot_stacked_bars(self, ax, by, sum_over, colors, title):
handles, labels = ax.get_legend_handles_labels()
if self._horizontal:
# Make legend order match visual stack order
ax.legend(reversed(handles), reversed(labels))
ax.legend(list(reversed(handles)), list(reversed(labels)))

else:
ax.legend()

Expand Down Expand Up @@ -617,7 +618,7 @@ def add_catplot(self, kind, value=None, elements=3, **kw):
if value is None:
if "_value" not in self._df.columns:
raise ValueError(
"value cannot be set if data is a Series. " "Got %r" % value
"value cannot be set if data is a Series. Got %r" % value
)
else:
if value not in self._df.columns:
Expand Down Expand Up @@ -992,7 +993,7 @@ def plot_shading(self, ax):
self._swapaxes(start_x, i - 0.4),
*self._swapaxes(end_x, 0.8),
facecolor=shading_style.get("facecolor", default_shading),
edgecolor=shading_style.get("edgecolor", None),
edgecolor=shading_style.get("edgecolor"),
ls=shading_style.get("linestyle", "-"),
lw=lw,
zorder=0,
Expand Down