How to send the axes of a GUI to a figure outside the GUI
Show older comments
Hello,
I have a GUI with two axes. One displays an image, and the other displays a plot. I am trying to produce a push button for each axes that is allows the user to send the GUI axes to a new figure outside the GUI. I have looked into the copyobj(H,P) and findobj functions,
H = findobj("GUIFigureName",'type','axes','-not','tag',legend');
This gives me an error "Index exceeds matrix dimensions"... Error in SpecMap>SpecMap_OpeningFcn (line 137) handles.P = varargin{1};
Is there anyway to send my GUI axes to a new figure?
Thank You very much, -Eric
Answers (1)
per isakson
on 20 Apr 2013
Edited: per isakson
on 20 Apr 2013
Either something like
H = findobj( 'Name', 'GUIFigureName','type','axes','-not','tag','legend' );
or
H = findobj( figure_handle, 'type','axes', '-not','tag','legend' );
.
Yes, copyobj(H,P) should be the way to do it. An alternative is a bunch of low level get and set on children of H and P, respectively.
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!