"Invalid handle." Error while using "Plot3".
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abhay Aradhya
am 9 Jun. 2017
Beantwortet: Walter Roberson
am 9 Jun. 2017
ax = axes('Parent',customUserInterface,'Position',[.1 .5 .375 .4]);
hold on
for m=1:numOfAP
plot3(ax,Data(m).traj(:,1),Data(m).traj(:,2),Data(m).traj(:,3),'g','LineWidth',2)
hold on
grid on
end
hold on
The Error points to the line with "Plot3". What am I going wrong with? Thanks in advance.
5 Kommentare
Akzeptierte Antwort
Walter Roberson
am 9 Jun. 2017
subplot() removes any axes that it overlaps. Your subplot() has exactly the same Position as your axes() call, so the subplot axes is going to overlap the explicit axes() created, which will cause the specific axes to be deleted.
0 Kommentare
Weitere Antworten (1)
KSSV
am 9 Jun. 2017
You should proceed like this.
h = plot3(rand(1,2),rand(1,2),rand(1,2),'g','LineWidth',2) ;
grid on
for m=1:100
set(h,'XData',rand(1,2),'YData',rand(1,2),'ZData',rand(1,2)) ;
end
2 Kommentare
Siehe auch
Kategorien
Mehr zu Subplots 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!