Adding an object to a figure created with GUIDE

2 次查看(过去 30 天)
Hi! Here is my question:
Is it possible to add an object (i.e. axes) to a figure that I have created with GUIDE?
I have created a *.fig with GUIDE called boton.fig with just one button. To open it I use:
h = boton
and for getting the handles I use:
handles = guihandles(h)
At this point, the variable 'handles' contains the following:
handles =
figure1: 1
pushbutton1: 200.1094
But, if I write
get(0,'CurrentFigure')
the answer is [], so, there's no current figure in spite of the recently open boton.fig. And now, if try to put some axes on that boton.fig with the command 'axes', another figure opens.
What can I do to add the axes on boton.fig and not to a new figure??

采纳的回答

Walter Roberson
Walter Roberson 2011-5-9
You should be able to use
axes('Parent',handles.figure1)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by