Seaborn: AttributeError: module 'seaborn' has no attribute 'scatterplot'

Created on 1 May 2019  路  6Comments  路  Source: mwaskom/seaborn

Hi There,

I was trying to create a scatter plot in Jupyter Notebook.

m = sns.scatterplot(x="WeightLB", y="HeightIn", data=data)

But I am getting the below error.

Screen Shot 2019-04-30 at 6 11 31 PM

Thanks!
Sheila

relational question

All 6 comments

Almost certainly you are using a version that predates the introduction of that function in 0.9.0.

You could try like plotting Reg plot and set fit_reg to false
sns.regplot(x=data["WeightLB"], y=data["HeightIn"], fit_reg=False);

Almost certainly you are using a version that predates the introduction of that function.

Yes, but what do you call a scatter plot in previous sns versions?

lineplot is the new scatterplot

try this
sns.relplot(x="WeightLB", y="HeightIn", data=data)

Yes, but what do you call a scatter plot in previous sns versions?

There was no explicit scatter plot function prior to v0.9.0. As @praveen-somineni suggests, it was possible to draw a scatter plot via regplot or lmplot with fit_reg=False, if for some reason you cannot upgrade.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tritemio picture tritemio  路  3Comments

amelio-vazquez-reina picture amelio-vazquez-reina  路  4Comments

phantom0301 picture phantom0301  路  3Comments

vinay-jayaram picture vinay-jayaram  路  3Comments

JanHomann picture JanHomann  路  3Comments