On Thu, Feb 28, 2008 at 6:55 AM, Jose Gomez-Dans <[EMAIL PROTECTED]> wrote:
> Hi!
> 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:

If I understand what you are trying to do, you should be using the
sharex and sharey settings for ax1

  ax1 = fig.add_subplot(211)
  ax2 = fig.add_subplot(212, sharex=ax1, sharey=ax1)

then the xlim and ylim will be shared, so panning/zooming navigation
in either will affect both.

>         pylab.draw() #Why doesn't the window refresh when it gets here? I

Not sure (it should) but I would use fig.canvas.draw() here in any case.

JDH

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to