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
those upper letters could be, e.g. Z: shift+z, or Caps, then z,
those lower letters could be, e.g. z: z, or Caps, then shift+Z, :)
arrow keys: pan the data
a: axis auto
n: axis normal
e: axis equal
g: toggle grid state
spacebar: toggle axis tick display state
Cite As
Qingfeng Liu (2026). Zoom & Pan Keys (https://in.mathworks.com/matlabcentral/fileexchange/120748-zoom-pan-keys), MATLAB Central File Exchange. Retrieved .
Thanks to Ned Gulley! https://www.mathworks.com/matlabcentral/fileexchange/3090-zoom-keys?s_tid=srchtitle
MATLAB Release Compatibility
Created with
R2017a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
AxisDrag
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
