How can I make a figure with 2 charts, and both charts have dual Y axis?
I know have to make dual y axis for a figure with 1 chart, but wasn't able to figure out how to do it for two charts.
This is the syntax I use for matplotlib:
fig, ax = plt.subplots()
CodePudding user response:
This should be fairly simple:
fig, ax = plt.subplots(1, 2) # or (2, 1) depending on how you want them aligned
ax[0].plot(...)
ax[1].plot(...)