File Exchange

image thumbnail

DRAGPLOT

version 1.0.0.0 (3.59 KB) by Mark Brown
DRAGPLOT allows plots to be moved between figure windows via drag 'n drop.

1 Download

Updated 31 Mar 2016

View License

DRAGPLOT allows plotted lines to be dragged from one figure window and dropped into another. This is convenient when you desire to compare the results of multiple programs and you haven't taken the time or trouble to save data, recall it, and issue custom plot commands.
Lines can be moved or copied from one figure to another, or can be deleted, all using common drag 'n drop operations.

Cite As

Mark Brown (2020). DRAGPLOT (https://www.mathworks.com/matlabcentral/fileexchange/3678-dragplot), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (13)

Mohammad

very useful program, thank you.

Nick

PointerWindow Fix for HG2:

replace line 42 with

'try, f=get(0,''PointerWindow'');catch, f = matlab.ui.internal.getPointerWindow; end;',...

Mark Brown

The new graphics objects in R2014b eliminated the "pointerwindow" property of the root object, so this program no longer works. No known workarounds.

Thibault

For some reason, this function does not work any more in R2014b but it was very useful. Any idea on how to fix things?

Mohammad

very useful

Mmd

Very useful program, thanks.

Sahin Aktas

Thanks for this brilliant idea, one improvement could be allowing drop to an axes within the same figure, I have implemented that and used at my work, thanks again.

Mark Brown

To answer DJM's question, that may be intended behavior! If you drop a line anywhere except over a valid axis, that line object will be deleted. That's intentional. If you want to copy a line object, hold down the CTRL key when you drag and drop.

DJ M

Worked with no problems on a simple test. I only had one case where placement messed up, all the selected data points moved off the plot and I couldn't bring them back. I wonder what a good test case for that is...

Thanks Mark!

John sopko

The link in Norbert's comment above seems to be broken. Can somone give the updated link?
Thanks,
John

Roy Schestowitz

This is an excellent trick which proves to be highly useful. I used to wonder why Mathworks hadn't implemented this functionality. I had to overcome this from command-line before I knew that Mark Brown solved the problem.

Scott Hirsch

This is really cool, and quite useful. It sure beats printing two pages, stacking them on top of each other, and holding them up to a bright light!

Norbert Marwan

I would like to suggest to look at the INCA tool, available in the File Exchange area: http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=2387
which has some more functionality. Furthermore, its functionality can be added to the menubar.

Updates

1.0.0.0

Added BSD License.

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