Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ValueError when trying to plot with hist=True and color as list of colors. #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions joypy/joyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ def _get_color(i, num_axes, j, num_subgroups):

if hist:
# matplotlib hist() already handles multiple subgroups in a histogram
a.hist(group, label=sublabels, bins=bins, color=color,
group_color = _get_color(i, num_axes, 0, num_subgroups)
a.hist(group, label=sublabels, bins=bins, color=group_color,
range=[min(global_x_range), max(global_x_range)],
edgecolor=linecolor, zorder=group_zorder, **kwargs)
else:
Expand Down Expand Up @@ -582,4 +583,3 @@ def _get_color(i, num_axes, j, num_subgroups):
fig.tight_layout(h_pad=h_pad)

return fig, _axes