MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [讨论]清除坐标轴内容 (https://www.labfans.com/bbs/showthread.php?t=5498)

kmkeke 2008-11-26 19:04

[讨论]清除坐标轴内容
 
清除坐标轴内容
请问一个figure里面有两个坐标轴,用什么办法把坐标轴清空呢,我采用reset(handles.axes1)不行,h=get(handles.axes1,‘default’);set(handles.axes1,h)也不行,cla 只能清空一个,请问该怎么办呢?

travelround 2008-11-26 22:54

回复: [讨论]清除坐标轴内容
 
可以先将axes1设为当前坐标轴用cla清除
再将axes2设为当前坐标轴再用cla 清除
设置当前坐标轴
set(handles.figure1,'CurrentAxes',handles.axes1);

kmkeke 2008-11-27 14:50

回复: [讨论]清除坐标轴内容
 
axes(handles.axes1);
cla;
axes(handles.axes2);
cla;
这个可以了
谢谢


所有时间均为北京时间。现在的时间是 11:04

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.