Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 843
omer nessing Avatar asked Sep 13 '25 18:09

omer nessing


1 Answers

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__
like image 196
Lucas Lopes Avatar answered Sep 16 '25 08:09

Lucas Lopes