4

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?

omer nessing
  • 41
  • 1
  • 2

1 Answers1

4

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__
Lucas Lopes
  • 916
  • 7
  • 5
  • Seems that it doesn't work inside jupyter notebook, with `import sys` and updating it. You should indeed `$ workon` into your virenv and do the procedure there. – Maryam Nov 03 '20 at 10:33