problem using trisurf in a gui
3 views (last 30 days)
Show older comments
Hi,
I’ve got a problem with using trisurf to plot to a set of axes on a panel on a gui. It worked fine before when I was plotting onto a standalone figure but not now I am trying to plot onto a set of axes that are on a panel inside a gui.
I want to draw multiple objects onto the same plot inside a loop. If I do it as shown below then trisurf ignores the previous axes(ax2) command and does not plot onto ax2 but rather creates a new figure and draws on that.
axes(ax2) % ax2 is the handle for the axes inside the GUI
for jj = 1:bb
% other code not shown
[aaa,bbb] = convhull(vx, vy, vz);
trisurf(aaa,vx,vy,vz)
hold on
end
On the other hand, if I manually tell it which axes to draw on, as below, then it does plot on ax2 but it clears the axes every time before drawing the next object, so it only draws one object a time rather than all together on the same plot. The "hold on" command doesn't prevent it from starting afresh every time.
trisurf(aaa,vx,vy,vz,'Parent',ax2)
hold on
Any ideas would be appreciated on how to get round this
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Legend in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!