%GuiDm_1.m Illustrates user interface menu.
% Copyright S. Nakamura, 1995
close, clear
figure(1)
set(gcf,'Position',[100,300,300,220],...
'NumberTitle','off',...
'Name','GuiDm_1')
x=0:0.1:10;, y=sin(x);
p=plot(x,y);xlabel('x');ylabel('y=sin(x)');
stl = uimenu(gcf,...
'Label',' Line Style',...
'BackgroundColor',[0.8, 0.8, 0.8],...
'Position',2);
clr = uimenu(gcf,...
'Label',' Line Color',...
'BackgroundColor',[0.8, 0.8, 0.8],...
'Position',1);
lw = uimenu(gcf,...
'Label',' Line width',...
'BackgroundColor',[0.8, 0.8, 0.8],...
'Position',3);
solid = uimenu(stl, ...
'Label', 'Solid',...
'CallBack','set(p,''LineStyle'',''-'')');
dotted = uimenu(stl, ...
'Label', 'Dotted',...
'CallBack','set(p,''LineStyle'','':'')');
yellow = uimenu(clr,...
'Label', 'Yellow',...
'BackgroundColor',[0.9, 0.9, 0.1],...
'CallBack','set(p,''Color'',''y'')');
green = uimenu(clr, ...
'Label','Green',...
'BackgroundColor',[0.1, 0.9, 0.1],...
'CallBack','set(p,''Color'',''g'')');
red = uimenu(clr,...
'Label', 'Red',...
'BackgroundColor',[0.9, 0.1 , 0.1],...
'CallBack','set(p,''Color'',''r'')');
solid = uimenu(lw, ...
'Label', '0.5',...
'CallBack','set(p,''LineWidth'',0.5)');
dotted = uimenu(lw, ...
'Label', '3.0',...
'CallBack','set(p,''LineWidth'',1.0)');