5.0

5.0 | 3 ratings Rate this file 265 downloads (last 30 days) File Size: 4.08 KB File ID: #21414

linkzoom.m v1.3 (Aug 2009)

by Carlos Adrian Vargas Aguilera

 

11 Sep 2008 (Updated 20 Aug 2009)

Code covered by BSD License  

Links the ZOOM and PAN regions of different axes.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

Download Now | Watch this File

File Information
Description

LINKAXES links the axis limits of several axes. LINKZOOM links the ZOOM and PAN regions ignoring the axes limits, then, it can be used to link several axes with different limits.

Usage:

>> subplot(311)
>> ...
>> subplot(312)
>> ...
>> subplot(313)
>> ...
>> linkzoom % links all axes on current figure!

and that's it. Make a zoom or a panning of any of the axes and the others will do the same!

Other options are the figure or axes handles and the axis to be linked: 'x' or 'y' or both 'xy' (default).

By now the panning is actualized on all axes until the mouse is released :P, any help?

Check out the included example to notice the difference with LINKAXES.

(Bugs reports and suggestions will be very appreciated)

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
tlabel.m v2.6.1 (Sep 2009)
This submission has inspired the following:
addaxes.m v1.1 (Sep 2009)

MATLAB release MATLAB 7.7 (R2008b)
Zip File Content  
Other Files license.txt,
linkzoom.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
11 Sep 2008 An User

It works.

12 Sep 2008 John D'Errico

Nothing more to say here than - well done.

09 Jul 2009 Andres

Very very good! Just when I needed such a function, linkzoom appeared as the Pick of the Week. As I mentioned there, it works well with addaxis, http://www.mathworks.com/matlabcentral/fileexchange/9016 , without the need to replace the original zoom function.
Thank you Carlos Adrian!

Please login to add a comment or rating.
Updates
19 Jun 2009

1) Fixed bug with already zoomed axes.
2) Changed the example.

29 Jul 2009

v1.2 Fixed small bug with ZOOM OUT and Double-Click. Other minor changes.

20 Aug 2009

v1.3 Fixed bug when using PLOTYY.

Tag Activity for this File
Tag Applied By Date/Time
data exploration Carlos Adrian Vargas Aguilera 22 Oct 2008 10:19:00
linkaxes Carlos Adrian Vargas Aguilera 22 Oct 2008 10:19:00
zoom Carlos Adrian Vargas Aguilera 22 Oct 2008 10:19:00
pan Carlos Adrian Vargas Aguilera 22 Oct 2008 10:19:00
linkprop Carlos Adrian Vargas Aguilera 22 Oct 2008 10:19:00
subplot Carlos Adrian Vargas Aguilera 22 Oct 2008 10:19:00
link Carlos Adrian Vargas Aguilera 22 Oct 2008 10:19:00
tlabel Carlos Adrian Vargas Aguilera 19 Jun 2009 15:58:50
image processing Carlos Adrian Vargas Aguilera 19 Jun 2009 15:58:51
signal processing Carlos Adrian Vargas Aguilera 19 Jun 2009 15:58:51
potw Shari Freedman 02 Jul 2009 10:12:53
plotyy Carlos Adrian Vargas Aguilera 30 Jul 2009 09:52:18
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com