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)
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.
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With