Skip to content
Advertisement

How to plot multiple lines in one figure in Pandas Python based on data from multiple columns? [duplicate]

I have a dataframe with 3 columns, like this:

JavaScript

how can I plot a line for A, B and C, where it shows how their weight develops through the years. So I tried this:

JavaScript

However, I get multiple plots and that is not what I want. I want all those plots in one figure.

enter image description here

Advertisement

Answer

Does this produce what you’re looking for?

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement