I've got a Matplotlib graph with two y axes, created like:
ax1 = fig.add_subplot(111)
ax1.grid(True, color='gray')
ax1.plot(xdata, ydata1, 'b', linewidth=0.5)
ax2 = ax1.twinx()
ax2.plot(xdata, ydata2, 'g', linewidth=0.5)
I need grid lines but I want them to apply to both y axes not just the left one. The scales of each axes will differ. What I get is grid lines that only match the values on the left hand axes.
Can Matplotlib figure this out for me or do I have to do it myself?
Edit: Don't think I was completely clear, I want the major ticks on both y axes to be aligned but the scales and ranges are potentially quite different making it tricky to setup the mins and maxes manually to achieve this. I am hoping that matplotlib will be able to do this "tricky" bit for me. Thanks