File Exchange

image thumbnail

Zoom Keys

version (4.08 KB) by Ned Gulley
Pan and zoom quickly around your 2-D data using mouse and keyboard shortcuts.


Updated 13 Jun 2018

GitHub view license on GitHub

Use this tool to move quickly around the data displayed in a 2-D plot. Make sure the figure has focus, and then press any of the following keys. Clicking and dragging will pan the data.

Keys you can use are:
z, Z: zoom in, zoom out, in both dimensions
x, X: zoom in, zoom out, x dimension only
y, Y: zoom in, zoom out, y dimension only
arrow keys: pan the data
a: axis auto
n: axis normal
e: axis equal
g: toggle grid state
spacebar: toggle axis tick display state
h: help

Cite As

Ned Gulley (2020). Zoom Keys (, GitHub. Retrieved .

Comments and Ratings (12)

Jose Rego Terol

Easy to use and useful.

Hsi-Ming Chang

Very useful tool.


Quite handy. Thanks.Can you also include the ability to zoom to where to mouse is pointing?


Excellent and very helpfull !!!
It made my matlab to be very handy tool !
Thanks a lot !


I´m not able to start this m-File.
When I call "axdrag" from the command window, I get this error-message:

"Warning: Setting the "KeyPressFcn" property is not permitted while this mode is active.
>In uitools.uimodemanager.uimodemanager>localModeWarn at 59 In axdrag at 54"

I use R2009b.
Thank you for your help.


Great tool.
Should be built into plot. Since plot navagation in matlab is a huge pain.

Dinesh Appya

Its really excellent

Kalpit Desai

Awesome tool! Everything I need with easy-to-use interface. Thank you Ned!


Anand Joshi

a very useful tool for me to scroll through the data consisting of several cycles. will try to enhance it by providing mouse controls as well

tom turbo

Antonin Garriga

very interesting


Moving to GitHub.

Changed copyright information and submission title.

Fixed help, added double buffering

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: Orthogonalslicer, INTERACTIVEMOUSE