Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to print only line color from lineplot in seaborn?

This is my code

fig, ax = plt.subplots(figsize=(50, 30))
sns.lineplot(data=dataframe, x='A', y='B', hue='C', ax=ax)

Then it appeared like this

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

There is a blue line and it is painted in light blue as if it spreads around it.

I only want to see the color of the straight line

like this for example

enter image description here

What should I do?

>Solution :

That’s the confidence interval that you see. You can supress it by passing ci=None:

fig, ax = plt.subplots(figsize=(50, 30))
sns.lineplot(data=dataframe, x='A', y='B', hue='C', ax=ax, ci=None)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading