Skip to content
Advertisement

Matplotlib: I don’t know if I’m plotting in the correct way

When I need to plot 2 series on y axis, I don’t know if this is the best way. It works with lines, but it does not work with line + bars. If I set y2 kind='bar', this serie disappears. indexesM is my dataframe. This is the code:

JavaScript

Advertisement

Answer

I created a composite graph by customizing a sample from the official reference. It uses ax.bar().

JavaScript

enter image description here

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