打印

matlab 曲线标记

[复制链接]
138|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
cooldog123pp|  楼主 | 2024-5-25 10:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
曲线标记

h0=figure('toolbar','none',...
    'position',[198 56 408 468],...
    'name','my second gui');
h1=axes('parent',h0,...
    'position',[0.15 0.45 0.7 0.5],...
    'visible','on');
x=0:0.1:2*pi;
k=plot(x,sin(x),'*');
xlabel('自变量X');
ylabel('函数值Y');
title('标记类型的改变');
p1=uicontrol('parent',h0,...
    'style','pushbutton',...
    'string','+',...
    'fontsize',20,...
    'foregroundcolor',[1 1 1],...
    'backgroundcolor',[0 0 0],...
    'position',[60 100 50 20],...
    'callback','set(k,''marker'',''+'')');
p2=uicontrol('parent',h0,...
    'style','pushbutton',...
    'string','o',...
    'fontsize',20,...
    'foregroundcolor',[1 1 1],...
    'backgroundcolor',[0 0 0],...
    'position',[170 100 50 20],...
    'callback','set(k,''marker'',''o'')');
p3=uicontrol('parent',h0,...
    'style','pushbutton',...
    'string','x',...
    'fontsize',20,...
    'foregroundcolor',[1 1 1],...
    'backgroundcolor',[0 0 0],...
    'position',[280 100 50 20],...
    'callback','set(k,''marker'',''x'')');
p4=uicontrol('parent',h0,...
    'style','pushbutton',...
    'backgroundcolor',[1 1 1],...
    'fontsize',20,...
    'fontweight','demi',...
    'string','关闭',...
    'position',[150 30 80 60],...
    'callback','close');
t1=uicontrol('parent',h0,...
    'style','text',...
    'string','星号',...
    'fontsize',12,...
    'fontweight','demi',...
    'position',[60 120 50 20]);
t2=uicontrol('parent',h0,...
    'style','text',...
    'string','圆圈',...
    'fontsize',12,...
    'fontweight','demi',...
    'position',[170 120 50 20]);
t3=uicontrol('parent',h0,...
    'style','text',...
    'string','叉号',...
    'fontsize',12,...
    'fontweight','demi',...
    'position',[280 120 50 20]);


使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1654

主题

5986

帖子

29

粉丝