Clearing isosurface (or other plots) from an axes

为君一笑 提交于 2019-12-12 05:14:28

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!