MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]axes坐标系的用法 (https://www.labfans.com/bbs/showthread.php?t=6871)

mysterymask 2009-03-16 16:39

[求助]axes坐标系的用法
 
2 个附件
我用axes画直线,当我改变直线参数的时候画出了两天直线,具体现象请见附件“画图问题”
我想当直线参数改变后重新画图时,以前的图像消除不显示,我不知道怎么做,请高手帮帮忙啊。
我画线的代码如下:
function drawButton_Callback(hObject, eventdata, handles)
clc;
hold on;
axis equal;
grid on;
x1 = str2double(get(handles.P1X_edit,'string'));
y1 = str2double(get(handles.P1Y_edit,'String'));
x2 = str2double(get(handles.P2X_edit,'String'));
y2 = str2double(get(handles.P2Y_edit,'String'));
plot([x1 x2],[y1 y2]);
hold off;

3061211037 2009-03-17 07:36

回复: [求助]axes坐标系的用法
 
去掉hold on试试

云清 2009-03-20 22:45

回复: [求助]axes坐标系的用法
 
你是消除以前的图像的嘛 干嘛用clc?应该是clf吧!!:cool:


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

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