Python Forum

Full Version: plt.bar on two different Y axis
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I have this data set :
Age Var 1 Var 2
17-31 ans 19565 11178
32-44 ans 19757 24011
45-54 ans 23885 45895
55-64 ans 29622 66611
65-74 ans 36670 55734
75-84 ans 45317 28768
85 ans et plus 54347 6448

and i'd like to plot this df with the funciton plt.bar such as I obtain something like this (see attachment).

SO I would have two different Y-axis for each variable. And preferably I'd like both histograms to be generate with the function plt.bar.

I tried do hard but I can't manage to do it on matplotlib.

I thank you so much by advance for your help !

Mathis