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

Conversation

abrazhe
Copy link

@abrazhe abrazhe commented Nov 29, 2022

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)

… of colors.

## 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)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant