I have two datasets with different data coordinates, which I want to plot on different subplots, all showing the same extent. I want to be able to zoom into one of the subplots, and have the other follow (through some conversion of the former's extent).
Initially, I just want one plot to follow the other (but I could easily extend that to both plots if needs be). The code works, but I cannot update my plots automatically, although I call  pylab.draw(). What's the way to have my plots respond to my events without dragging the window borders, resizing the window, etc? I am using matplotlib 0.90.1 and GTKAgg backend on Linux. Here's some code snippet of what I am doing:

ax =fig.add_subplot(211)
xtent2=(0,2477,0,2319 )
im1=ax.imshow( image1,extent=xtent1,picker=True)
im2=ax2.imshow( image2)
ax2.set_xlim (1073, 1797)
ax2.set_ylim (1944, 1588)
def pick_new_extent(event):
        artist = event.artist
        (xlow,xhigh) = artist.get_axes().get_xlim()
        (ylow,yhigh) = artist.get_axes().get_ylim()
        [xmin, xmax, ymin, ymax] = CalculateWindowCoordinates(xlow, xhigh, ylow, yhigh) #This does the coordinate transformation

        ax2.set_ylim(ymax, ymin)
        pylab.draw() #Why doesn't the window refresh when it gets here? I need to change the window size to get it to refresh!!
fig.canvas.mpl_connect('pick_event', pick_new_exent)


Centre for Terrestrial Carbon Dynamics
Department of Geography, University College London
Gower Street, London WC1E 6BT, UK