Be the first to rate this file! 13 Downloads (last 30 days) File Size: 1.96 KB File ID: #25838

Select subplots with mouse, with visual feedback

by Matt Caywood

 

13 Nov 2009 (Updated 25 Oct 2011)

Click the mouse to select (and visibly toggle) multiple subplots. Returns subplot indices.

| Watch this File

File Information
Description

A very simple script that uses figure callbacks and openGL transparency to produce a visibly toggled state in subplots. Cousin to allowaxestogrow.m.

MATLAB release MATLAB 7.0.4 (R14SP2)
Other requirements OpenGL support.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
09 Jul 2010 Rebecca

This is exactly what I needed for a program I'm writing. I'm looking to make a small twist on using it, that is, to have my program wait for the first one to be clicked and when that's done, move on to something else. I've tried waitfor(p, 'ButtonDownFcn') and also a while loop (while goodplots(1:end) == 0)... but these don't seem to work. Any recs on embedding this?

09 Jul 2010 Matt Caywood

Hi Rebecca, check the documentation for waitfor -- 'ButtonDownFcn' doesn't change, so I don't think you can waitfor it.

You might change TogglePlot so that it would change some property of the figure, something like setappdata(get(src,'Parent'),'Done') then waitfor(fig,'AppData');

I haven't tested this but I expect something like it would work.

Please login to add a comment or rating.
Updates
25 Oct 2011

fixed error in comment

Tag Activity for this File
Tag Applied By Date/Time
data exploration Matt Caywood 16 Nov 2009 09:33:28
subplot Matt Caywood 16 Nov 2009 09:33:29
plot Matt Caywood 16 Nov 2009 09:33:29
axes Matt Caywood 16 Nov 2009 09:33:29
axis Matt Caywood 16 Nov 2009 09:33:29
figure Matt Caywood 16 Nov 2009 09:33:29
toggle Matt Caywood 16 Nov 2009 09:33:29
select Matt Caywood 16 Nov 2009 09:33:29
choose Matt Caywood 16 Nov 2009 09:33:29
pick Matt Caywood 16 Nov 2009 09:33:29

Contact us at files@mathworks.com