Show figure from Gui code
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi everybody.
I have a problem with my code GUI.
a1=str2num(get(handles.x1,'String'));
b1=str2num(get(handles.y1,'String'));
c1=str2num(get(handles.z1,'String'));
a2=str2num(get(handles.x2,'String'));
b2=str2num(get(handles.y2,'String'));
c2=str2num(get(handles.z2,'String'));
a3=str2num(get(handles.x3,'String'));
b3=str2num(get(handles.y3,'String'));
c3=str2num(get(handles.z3,'String'));
f = figure();
ax = axes('Parent',f)
plot3 (ax, [a1 a2 a3],[b1 b2 b3],[c1 c2 c3], 'Marker','o','LineStyle','-');
grid(ax, 'on');
rotate3d(ax, 'on');
With this code,i can plot a graph with my GUI,but when i add a plot in my figure is not ok.
example:
a1=str2num(get(handles.x1,'String'));
b1=str2num(get(handles.y1,'String'));
c1=str2num(get(handles.z1,'String'));
a2=str2num(get(handles.x2,'String'));
b2=str2num(get(handles.y2,'String'));
c2=str2num(get(handles.z2,'String'));
a3=str2num(get(handles.x3,'String'));
b3=str2num(get(handles.y3,'String'));
c3=str2num(get(handles.z3,'String'));
f = figure();
ax = axes('Parent',f)
plot3 (ax, [a1 a2 a3],[b1 b2 b3],[c1 c2 c3], 'Marker','o','LineStyle','-');
plot3 (ax, [a1 a2 a3],[-b1 -b2 -b3],[c1 c2 c3], 'Marker','o','LineStyle','-');
grid(ax, 'on');
rotate3d(ax, 'on');
It show only line. I need two line and many line in my figure.
1 Commento
the cyclist
il 25 Nov 2011
Can you please edit your post and use the "Code" markup feature? Your code is very hard to read.
Risposta accettata
Walter Roberson
il 25 Nov 2011
After the line
plot3 (ax, [a1 a2 a3],[b1 b2 b3],[c1 c2 c3], 'Marker','o','LineStyle','-');
add
hold(ax, 'on');
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Annotations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!