Is it possible to make a plot with two independent y-axes such that the tick marks align?
Below is an example of half of the solution. I\'ve doubled the y-axis using
Adding belatedly to the answers: for those who have both negative and positive values in their plots, the solution I have found is as follows:
max1 = np.nanmax(ax1.get_ybound()) #in case you have nan values
max2 = np.nanmax(ax2.get_ybound())
ax1.set_yticks(np.linspace(-max1, max1, 5))
ax2.set_yticks(np.linspace(-max2, max2, 5))
This results in symmetrical axis distances from zero, with the zero "line" on the y-axes aligned.
The difficulty with set_yticks is that it calculates between min and max, rather than min, 0, max.