plotting in gui
Afficher commentaires plus anciens
Hi All,
I am trying to desing a gui interface to interactively render plots. So I have a 2x3 figure pallet. All six have the tags axes_row11,axes_row12 ...and so on. I am trying to access these axes objects (from within a callback) by the following commands:
*********************************
mydata = guihandles(hObject);
axes(mydata.axes_row11);plot(1,1)
axes(mydata.axes_row12);plot(1,2);
OR
plot(mydata.axes_row11,1,1);
plot(mydata.axes_row12,1,2);
***************************************
Question: During the 2nd call to the 'Callback' I found that both axes_row11 and axes_row12 had been deleted and cannot be accessed anymore. Initating the commands 'plot'/'axes' is somehow modifying mydata by deleting certain handles. how do i solve this problem ?
please help
thanks,
rishabh
Réponse acceptée
Plus de réponses (3)
sco1
le 11 Mai 2011
I use
set(gcf,'CurrentAxes',handles.YourTagHere);
plot(x,y);
To switch between axes in the GUIs I make.
1 commentaire
Rishabh Kasliwal
le 11 Mai 2011
Arturo Moncada-Torres
le 13 Mai 2011
Have you tried using axes?
axes(mydata.axes_row11);
plot(1,1);
axes(mydata.axes_row12);
plot(1,2);
Hope it helps ;-)
Paulo Silva
le 13 Mai 2011
If you are using GUIDE just do
plot(handles.axes_row11,1,1);
plot(handles.axes_row12,1,2);
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!