Consider the following python code to build a matplotlib shape:
import matplotlib.pylab as pp import numpy as np alpha = np.linspace(0, 2 * np.pi, 400) sig1 = np.sin(alpha) sig2 = np.sin(2 * alpha) + 2 * (alpha > np.pi) ax1 = pp.subplot(111) ax2 = ax1.twinx() ax1.plot(alpha, sig1, color='b') ax2.plot(alpha, sig2, color='r') ax1.set_ylabel('sig1 value', color='b') ax2.set_ylabel('sig2 value', color='r') pp.grid() pp.show()
Give me a good plot

I would like to learn how to disable one of the axes for pan / zoom, so when I use the pan / zoom tool, only ax2 will scale, for example. Is there any way to do this? I want to do this programmatically.
Tompa source share