leotac / joypy

Joyplots in Python with matplotlib & pandas :chart_with_upwards_trend:
MIT License
556 stars 58 forks source link

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

Open abrazhe opened 1 year ago

abrazhe commented 1 year ago

Hi, I tried to plot a table with joypy with hist=True and "color" being a list of colors and got an error from matplotlib (v3.6.0).

Error message:

"ValueError: The 'color' keyword argument must have one color per dataset, but 1 datasets and 2 colors were provided"

How to reproduce:

import numpy as np
import pandas as pd
import joypy

table = pd.DataFrame({'one':np.random.randn(1000), 'two': 
np.random.randn(1000) + 5})

joypy.joyplot(table, color=['skyblue', 'fuchsia'], hist=True)