Home > Back-end >  Barplot and line plot in seaborn/matplotlib
Barplot and line plot in seaborn/matplotlib

Time:03-18

I have a pandas df as follows:

Date            Col1       Col2
2022-01-01      5          10000
2022-02-01      7          65000
2022-03-01      10         9500

I want to create a plot such that the xaxis is Date and the Col1 is a barplot and Col2 is a lineplot.

How can I do this in python? Open to try seaborn or matplotlib.

The Date is a pd.datetime object.

CodePudding user response:

Since the two scales are vastly different, create a

  • Related