问题
I use the following command:
isosurface(data,color)
Now if I use the same command with different data again, it gets superimposed on the previous one.
So, I tried doing:
p = patch(isosurface(foo));
isonormals(foo,p)
delete(p);
to delete the previous plot, but this way i can't use the colorbar
.
How do I go about this?
回答1:
Have you tried this?
cla(gca)
cla clears an axes and gca is the handle to the current axes you're are plotting on.
回答2:
Assuming you just want another patch plot in the same figure window, just use
hold off
来源:https://stackoverflow.com/questions/17617521/clearing-isosurface-or-other-plots-from-an-axes