Handle 2 axes in one GUI
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Cheng Yoong
le 17 Déc 2011
Réponse apportée : GANESH RATHOD
le 11 Nov 2017
I create a GUI with 2 axes.
The first axes I would like just to display an image. Code i used is as below:
I = imread('file destination')
imshow(I)
The second one I would like to plot something on it.
Then i create a button to reset the second axes to initial condition.
But when i press it,it erase everything on second axes and the initial condition was set at first axes.
now the image on first axes was replace by the initial condition.
Anyone can help me?it's kinda urgent.
*the initial condition here is a 3D manipulator plot.
2 commentaires
Réponse acceptée
Chandra Kurniawan
le 17 Déc 2011
16 commentaires
Chandra Kurniawan
le 17 Déc 2011
Of course you can.
You can do modification on X Y Z values
Eq :
[X Y Z] = cylinder(1);
Z = 10*Z;
X = X-20;
Y = Y-5;
h=surf(X,Y,Z);
axis([-10 10 -10 10 -10 10]);
Plus de réponses (3)
Image Analyst
le 17 Déc 2011
The pushbutton to clear the second axes should just look something like
axes(handles.axes2); % Do this immmediately upon entering callback function
cla reset;
If it doesn't mention anything about handles.axes1 after you set the current axes to #2 then it will not do anything to axes #1.
0 commentaires
Walter Roberson
le 17 Déc 2011
My recommendation is to specifically parent all graphics activity. I give an example here, which also has a link to a post in which I explain why it is important.
GANESH RATHOD
le 11 Nov 2017
for n = 1:3
if n==1;
axes(handles.axes1);
hold off;
cla reset;
elseif n==2;
axes(handles.axes2);
hold off;
cla reset;
else
axes(handles.axes3);
hold off;
cla reset;
end;
end;
0 commentaires
Voir également
Catégories
En savoir plus sur Graphics Performance dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!