How to Only plot Confidence Interval in Seaborn Line Plot

Viewed 2906

Is there a way to only plot the confidence interval using seaborn lineplot (or another seaborn method)? For example, I used seaborn lineplot to produce this graph:

enter image description here

To produce this graph I just have something like:

sns.lineplot(data=df, ax=x, x='day_of_week', y='y_variable', color='lightgrey'

Since I have a lot of data points per "day of week" which is "Monday", "Tuesday", etc. I just wanted to use the default 95% CI. Is there a way to just plot the CI without the darker line in the middle (which I assume is the mean)?

1 Answers

You can use linewidth=0:

tips = sns.load_dataset('tips')
sns.lineplot(data=tips, x='day', y='total_bill', linewidth=0)

Output:

enter image description here

Related