|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
set(0,'DefaultUicontrolFontsize',[20]);
x=0.01:pi/20:2*pi;
h=gcf;
menu1=uimenu(h,'Label','线型');
submenu11=uimenu(menu1,'Label','实线');
submenu12=uimenu(menu1,'Label','点划线');
submenu13=uimenu(menu1,'Label','虚线');
submenu14=uimenu(menu1,'Label','双点划线');
menu2=uimenu(h,'Label','颜色');
submenu21=uimenu(menu2,'Label','红色');
submenu22=uimenu(menu2,'Label','蓝色');
submenu23=uimenu(menu2,'Label','黑色');
menu3=uimenu(h,'Label','形状');
submenu31=uimenu(menu3,'Label','正玄');
submenu32=uimenu(menu3,'Label','余玄');
submenu33=uimenu(menu3,'Label','圆');
set(submenu11,'Callback','set(h,"Linestyle","-")')
set(submenu12,'Callback','set(h,"Linestyle","--")')
set(submenu13,'Callback','set(h,"Linestyle",":")')
set(submenu14,'Callback','set(h,"Linestyle","-.")')
set(submenu21,'Callback','set(h,"Color","[1 0 0]")')
set(submenu22,'Callback','set(h,"Color","[0 0 1]")')
set(submenu23,'Callback','set(h,"Color","[0 0 0]")')
set(submenu31,'Callback','h=plot(x,sin(x));')
set(submenu32,'Callback','h=plot(x,cos(x));')
set(submenu33,'Callback','h=plot(pi+sin(x),cos(x));')
[ 本帖最后由 lxq 于 2006-11-5 22:53 编辑 ] |
|