No BSD License  

Highlights from
magnifyrecttofig

5.0

5.0 | 2 ratings Rate this file 6 Downloads (last 30 days) File Size: 4.47 KB File ID: #7286
image thumbnail

magnifyrecttofig

by Andrew Diamond

 

27 Mar 2005 (Updated 28 Apr 2005)

Magnify contents of dragged rectangle to other figure.

Editor's Notes:

This file was a File Exchange Pick of the Week

| Watch this File

File Information
Description

Displays the contents of a displayed draggable rectangle on one axis of a source figure into an axis in a target figure. The difference in the screen size of the target axis and the size of the rectangle represents the magnification factor that the contents of the source rectangle will appear in the target figure.

Backwards compatible to R12.1 at least. Much smoother under R14x though.

Update of 3/29:
1) Put in arrow keys to have individual control over rectangle width and height
2) Saved size state of rectanglebetween drags and added 'r' key to restore default rectangle proportion (20% of axes)
3) Added 'm' key to toggle between maximizing target axis and having it be the original. Also, 'm' as argument to default to maximized vs orignal size.
4) Tried to fix wierd event timing bugs that would result in residual rectangles. The biggest fix came by disallowing the right mouse button.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
magnify
This submission has inspired the following:
On-figure magnifier

MATLAB release MATLAB 7.0.1 (R14SP1)
Other requirements Backwards compatible to R12.1 at least.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
26 Feb 2006 John D'Errico

A slick variation on magnify.

13 Jan 2008 Rodolfo Limas

very slick

Please login to add a comment or rating.
Updates
30 Mar 2005

Arrow keys to change rect width,height
Saved size of rect between drags & added 'r' key to restore default rect.
'm' key to toggle between orig. & max target axis
fix event bug that yielded residual rects by disallowing the right mouse.

28 Apr 2005

Bug fix to correct focus of window on first drag not being the source window which therefore didn't get keyboard input.
Added figurem.m to conviently install event handlers at "figure" time.

Tag Activity for this File
Tag Applied By Date/Time
data exploration Andrew Diamond 22 Oct 2008 07:44:20
magnify Andrew Diamond 22 Oct 2008 07:44:20
zoom Andrew Diamond 22 Oct 2008 07:44:20
rectangle Andrew Diamond 22 Oct 2008 07:44:20
graphics Andrew Diamond 22 Oct 2008 07:44:20

Contact us at files@mathworks.com