File Exchange

image thumbnail


version (3.49 KB) by Ryan Eustice
Allows the user to navigate a 2D/3D plot similar to the Adobe "hand" interface.

1 Download

Updated 30 Jan 2004

View License

DRAG: Move around on a 2-D or 3-D plot.

When plot dragging is on, you can click and drag the axes around while maintaining the current level of zoom. In a figure with multiple subplots, pressing and holding the left mouse button drags around the currently active subplot, while pressing and holding the right mouse button drags around all subplots simultaneously. Double clicking with the left mouse button restores the currently active plot to its restore point, while double clicking with the right mouse button restores all subplots to their defined restore point.

Cite As

Ryan Eustice (2020). drag.m (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)

Mr Wonderful

Very nicely engineered.
This should be part of MATLAB.

tom turbo

Christopher Wingard

Thank you! I've been looking for something like this for a while now.

Murray Thomson

Just what I was looking for. Many thanks.

Mark Brown

Truly EXCELLENT! This function should be in everyone's toolbox. Much better than the PAN.M function I submitted a few weeks prior.

Boyko Stoimenov

A must have.

Ju Zhang

Should be included in Matlab.

Rick Auch

Yes, fantastic. Very useful.

Scott Hirsch



Updated behavior to correctly work with plot legends and colorbars.

Updated behavior to correctly work with plot legends.

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