Code covered by the BSD License  

Highlights from
zinput

2.0

2.0 | 1 rating Rate this file 19 Downloads (last 30 days) File Size: 3.16 KB File ID: #9127

zinput

by Bjorn Gustavsson

 

23 Nov 2005 (Updated 28 Nov 2005)

Ginput with zoom-in, select, all-zoom out

| Watch this File

File Information
Description

ZINPUT - Graphical input from mouse with zoom
  
[OUT_REGS] = ZINPUT(N) gets N points or regions from the current axes and returns the X- and Y-ranges in a length Nx4 matrix OUT_REGS.
The cursor can be positioned using the mouse. Data points are entered by pressing the right mouse button (OUT_REGS(1)==OUT_REGS(2)==point_X), the region of the current axis are selected with the middle button, left button is for zooming, single cklick zooms in, click-and drag zooms to selected region (and doubble-click should zoom out - this feature is pending).
Any key on the keyboard except carriage return zooms out to the orignal axis. Carriage return/Enter, which terminates the input before N points are entered.
   
[OUT_REGS] = ZINPUT gathers an unlimited number of points until the return key is pressed.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
zoom2cursor
This submission has inspired the following:
ginput2.m v3.1 (Nov 2009)

MATLAB release MATLAB 6.5.1 (R13SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
05 Jan 2010 Masoud

Zoom in and Zoom out are good but the program does not return the coordinates of the selected pixel properly.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
gui Bjorn Gustavsson 22 Oct 2008 08:07:27
display Bjorn Gustavsson 22 Oct 2008 08:07:27
annotation Bjorn Gustavsson 22 Oct 2008 08:07:27
zoom ginput Bjorn Gustavsson 22 Oct 2008 08:07:27
zoom in Bjorn Gustavsson 22 Oct 2008 08:07:27
select Bjorn Gustavsson 22 Oct 2008 08:07:27
all zoom Bjorn Gustavsson 22 Oct 2008 08:07:27
graphical input Bjorn Gustavsson 22 Oct 2008 08:07:27
image process Bjorn Gustavsson 22 Oct 2008 08:07:27

Contact us at files@mathworks.com