Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seaborn Lineplot Module Object Has No Attribute 'Lineplot'

Using seaborn's documentation code to generate a lineplot returns an AttributeError: 'module' object has no attribute 'lineplot'. I have updated seaborn and reimported the module and tried again, no luck. Did lineplot get retired, or is there something else going on?

import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
fmri = sns.load_dataset("fmri")
ax = sns.lineplot(x="timepoint", y="signal", data=fmri)
like image 396
s-monie Avatar asked Aug 14 '18 17:08

s-monie


People also ask

How do you draw a Lineplot?

A line plot is a graph that displays data using a number line. To create a line plot, ​first create a number line that includes all the values in the data set. Next, place an X (or dot) above each data value on the number line.

How do you put markers on Seaborn Lineplot?

You can also plot markers on a Seaborn line plot. Markers are special symbols that appear at the places in a line plot where the values for x and y axes intersect. To plot markers, you have to pass a list of symbols in a list to the markers attribute. Each symbol corresponds to one line plot.

What does SNS Lineplot do?

When we want to create a line chart with multiple lines, we can map a categorical variable to hue. If we do this, sns. lineplot() will create a separate line for each category of our categorical variable.

What is ci in Seaborn?

The seaborn ci code you posted simply computes the percentile limits. This interval has a defined mean of 50 (median) and a default range of 95% confidence interval. The actual mean, the standard deviation, etc. will appear in the percentiles routine.


2 Answers

If you are using conda, you need to install seaborn with the version specified:

conda install -c anaconda seaborn=0.9.0

Once your seaborn 0.9.0 is installed properly, you should be able to use the lineplot function (at least it works on mine).

That way you don't have to go outside of the conda ecosystem and use seaborn with pip.

like image 161
Anthony Lei Avatar answered Oct 04 '22 17:10

Anthony Lei


Lineplot works with update to seaborn 0.9. conda has not yet integrated seaborn 0.9.0 into it's default channel, which is why the update to 0.9 failed on my first go.

Couldn't Update Seaborn via Default Channel but found another way to do it through this answer

like image 45
s-monie Avatar answered Oct 04 '22 18:10

s-monie