Adding an object to a figure created with GUIDE

4 Ansichten (letzte 30 Tage)
waninoco
waninoco am 9 Mai 2011
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??

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by