[Tutor] How to zoom in matplotlib without a mouse ?

eryksun eryksun at gmail.com
Mon Apr 29 11:07:36 CEST 2013


On Fri, Apr 26, 2013 at 4:50 PM, Peter Rowat <peter at pelican.ucsd.edu> wrote:
> To "zoom" a matplotlib graph, the matplotlib docs all say "use R mouse button".
>
> But my laptop has no mouse, only a touchpad (running OSX Mountain Lion).
> I've tried lots of  "click plus key" combinations, no luck yet.
>
> Any ideas?

I'm not a Mac user. A right-mouse click is often called a "secondary"
click, which is possibly a "two finger" click on your Mac.

With the "pan/zoom" tool, you zoom the axes by moving the pointer
while holding the secondary button. I don't know how easy that will be
with your touchpad. I usually use the "zoom rect" tool; you drag a
rectangular outline over the area you want to zoom. You could also use
ion() to switch to interactive mode. Then use axis([xmin, xmax, ymin,
ymax]) to programmatically zoom the graph.


More information about the Tutor mailing list