Code covered by the BSD License  

Highlights from
moveplot.m

4.58333

4.6 | 25 ratings Rate this file 14 Downloads (last 30 days) File Size: 3.02 KB File ID: #747

moveplot.m

by Brandon Kuczenski

 

17 Sep 2001 (Updated 25 Mar 2002)

Enables mouse-based on-screen manipulation of Plot data

| Watch this File

File Information
Description

Enable this function on a line object (such as a product of the plot function) to allow graphical manipulation of data on-screen: click on a point and drag it anywhere on the axes. Dragging off the axes results in an enlargement of the axes. moveplot can be called with arguments to allow 2-d motion, or motion restricted to only the x or y axis. Moveplot cleans up after itself.

Acknowledgements
This submission has inspired the following:
moveplot2.m, smoothplot.m, ZoomBox
MATLAB release MATLAB 6.0 (R12)
Other requirements Tested only on Win 2k. Functionality does not depend on Matlab R12.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (27)
18 Sep 2001 Angel Ezquerra

Very useful. No more need to "manually" edit plots using get and set 'xdata' and 'ydata'. Cool stuff!

07 Dec 2001 John Van Workum

Works great! Really tight code with some neat programming idioms.

07 Feb 2002 peter scott

excellent piece of code, saved me so much work!!!

16 Feb 2002 Andy Diamond

This thing just saved by b*tt. It does what it says, it works great. In constant use.
Thank you.

FYI, I did have to make one adjustment though because it wouldn't let me adjust a line plot which overlay an image because on line 63 get(h,'zdata') wasn't empty. Test probably meant for 3d plot. Commented out those lines for my purposes, worked great.

15 Jun 2002

Falsifying my results, which I used to consider a chore, is suddenly a pleasure.

Thanks buddy.

18 Jun 2002 Berthold Kaeferstein

Good thing to get the data "right". A pleasure to use!

14 Aug 2002 Steve H

Awesome. Saved me a ton of time.
Thanks!

23 Aug 2002 Yuval Cohen

Awesome !! Works perfectly. I use it all the time. Very nice code. Thanks

03 Jan 2003 Brian D

Great tool. I was about to write the same thing, glad I looked first

21 Mar 2003 Alessandro Bortolon

Great, simple and useful for save time in a lot of occasions. Thank you

18 Jun 2003 Olivier Salvado

perfect

22 Jul 2003 Suresh Joel

Works great! Saves a lot of time! Thanks a ton!

22 Jul 2003 Suresh Joel  
24 Nov 2003 Humberto Filho  
02 Feb 2004 Derek Goring

This is a very useful piece of code, neatly written. I was able to hack it to do what I wanted very easily (draw vertical lines on a spectrum and slide them backwards and forwards horizontally to delineate the range for fitting a line thru the data).

01 Sep 2004 subbarao vemula

this is very useful function for my post-flight analysis software that i have developed using matlab. i am looking for the ways to enhance features of this tools. moveplot.m would definitely give an add to my tool.

15 Sep 2004 senthil kumar

good for movie plot

15 Sep 2004 senthil kumar

allways perfect

29 Sep 2004 omidy ostova  
19 Nov 2004 Sebastien Montet

Spot on what I wanted.

25 Nov 2004 Tran DiepCam

You've done well

04 Jan 2005 Rami Neseem

very useful thanks

31 May 2005 Perico de los Palotes

Muy util

06 Jul 2005 Pablo Sebastian

Great function. Just what i needed....

22 Jan 2009 Peter Manley-Cooke

Brilliant. All I need now is a flag to tell if the data has been changed.

08 Feb 2010 Kushsairy

Hi
I would like to know how to read the new data point from the function(where is the point stored). Coz i need to pass the new point to my next function

06 Oct 2010 Waldemar

Nice function, I love it!

Hi Kushsairy and others,

just get the data out of the plot after moveplot like this:
x = get(h,'XData'); y = get(h,'YData');

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
data exploration Brandon Kuczenski 22 Oct 2008 06:37:43
plot Brandon Kuczenski 22 Oct 2008 06:37:43
graphical Brandon Kuczenski 22 Oct 2008 06:37:43
graphics Brandon Kuczenski 22 Oct 2008 06:37:43
manipulation Brandon Kuczenski 22 Oct 2008 06:37:43
interaction Brandon Kuczenski 22 Oct 2008 06:37:44
data Brandon Kuczenski 22 Oct 2008 06:37:44
mouse interaction Peter Manley-Cooke 22 Jan 2009 07:54:03
interaction Nilimb 31 Aug 2011 14:47:50
data gianluca messina 02 Dec 2011 11:26:05

Contact us at files@mathworks.com