omer nessing
omer nessing

Reputation: 41

AttributeError: 'PathCollection' object has no property 'hue'

I'm trying to get to know seaborn functions. I was trying to execute the jointplot function as it appears on the seaborn website on JupyterLab 2.2.6

https://seaborn.pydata.org/generated/seaborn.jointplot.html#seaborn.jointplot

the code is as follows:

import seaborn as sns
penguins = sns.load_dataset("penguins")
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", hue="species")

trying this I get a blank plot on screen and an error message that reads:

AttributeError: 'PathCollection' object has no property 'hue'

how can I resolve this issue?

Upvotes: 4

Views: 7861

Answers (1)

Lucas Lopes
Lucas Lopes

Reputation: 936

Just update seaborn in the terminal: $ sudo pip install seaborn -U

To check your version, run this python command:

import seaborn as sns
sns.__version__

Upvotes: 4

Related Questions