Reputation: 31
I installed seaborn, but when I do the example from the Seaborn website, I get StopIteration message, how do I fix it?
import seaborn as sns penguins = sns.load_dataset("penguins") sns.histplot(data=penguins, x="flipper_length_mm")
StopIteration Traceback (most recent call last) Cell In [33], line 1 ----> 1 sns.histplot(data=penguins, x="flipper_length_mm")
Upvotes: 2
Views: 1888
Reputation: 41
The problem seem to be in the default color definition function. If you specify a color you can skip the error:
sns.histplot(data=penguins, x="flipper_length_mm", color='blue')
That solved the problem for me, hope it does for you as well. Cheers
Upvotes: 4
Reputation: 534
The problem is with matplotlib==3.6.1
You have 2 variants:
pip install matplotlib --upgrade
pip install matplotlib==3.6.0 --force-reinstall
Both variants worked for me.
Here is the same issue on GitHub: https://github.com/mwaskom/seaborn/issues/3072
Upvotes: 3