Re: Pan/Zoom with Matplotlib




On Oct 18, 1:48 am, Czenek <cze...@xxxxxxxxx> wrote:
Hi,
can I use somehow standard matplotlib's functions pan/zoom? I would
like to zoom my created graph after double-clicking and move with it
after keyboard (arrow) pressing (similar as Google Maps). And I want
also to control how much it zooms and how far is the graph moved after
pressing a key (or double-clicking).
So are there any appropriate API functions which can be connected with
keyboard and mouse events?

Thanks
Czenek

PS: I'd like to use it with tk.



And

import matplotlib as mpl
f=mpl.figure(figsize(5,5),dpi=100)
sbplt=f.add_subplot(111)

....

while 1:
x1,x2=sbplt.get_xlim()
y1,y2=sbplt.get_ylim()
sbplt.set_xlim(x1+0.1,x2+0.1)
sbplt.set_ylim(y1+0.1,y2+0.1)
f.canvas.draw()


this works pretty well on Linux, but the movement on Windows is slow
and therefore it is not smooth.

Any advice for better smoothness?

Czenek
.



Relevant Pages

  • Pan/Zoom with Matplotlib
    ... like to zoom my created graph after double-clicking and move with it ... after keyboard pressing. ... also to control how much it zooms and how far is the graph moved after ...
    (comp.lang.python)
  • Re: Subform field - dynamic field size - help
    ... you can use the control's Enter event procedure to run the code i ... if you want to open the Zoom box by using a keyboard combination that works ... Zoom box opens. ...
    (microsoft.public.access.forms)
  • Re: Mouse features?
    ... 'n' key on the keyboard, and the right button to simulate pressing the ... Registered Linux User: 473690 ... Registered Ubuntu User: 22747 ...
    (Ubuntu)
  • Re: Excel and InFocus Projector
    ... Similiar to a wheel, but there are no ... I used it strickly with the pad and no keyboard or mouse. ... a setting in Excel you might check. ... Uncheck "Zoom on roll with Intellimouse" if it is checked. ...
    (microsoft.public.excel.misc)
  • Re: Large 2D Graph Additionally
    ... providing access to hw acceleration through a thin layer. ... > Obviously I require usual operations of zoom etc. ... showing the lower and more numerous lower level node/edges only ... The graph will be static as such, ...
    (microsoft.public.win32.programmer.directx.managed)