📄 drawinput.m
字号:
function fig = drawinput()
%高级画图对话框
h0 = figure('Color',[0.925490196078431 0.913725490196078 0.847058823529412], ...
'MenuBar','none', ...
'Name','高级绘图', ...
'NumberTitle','off', ...
'Position',[248 242 519 264], ...
'Tag','Fig1');
hmenufile=uimenu('label','(&F)文件',...
'tag','menufile');
hsubopen=uimenu(hmenufile,'label','打开',...
'callback','openimg');
hsubsave=uimenu(hmenufile,'label','保存',...
'callback','saveimg');
hsubopt2= uimenu(hmenufile,'Label','退出', ...
'Tag','uimenu1',...
'callback','exitcal(findobj(''tag'',''main''))');
h1 = uicontrol('Units','normalized', ...
'BackgroundColor',[1 1 1], ...
'FontSize',10, ...
'FontWeight','bold', ...
'ForegroundColor',[0 0 1], ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',[1/3 0 3/4 1], ...
'String',['t=0:pi/50:4*pi;','y1=exp(-t/3);','y2=exp(-t/3).*sin(3*t);','plot(t,y2,t,y1,t,-y1);'], ...
'Style','edit', ...
'Tag','editinput', ...
'max',2,...
'TooltipString','指令输入之后,鼠标点击确定即可执行指令!',...
'callback','drawinputok(findobj(''tag'',''editinput''))');
h1 = axes('Parent',h0, ...
'Units','normalized', ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'Color',[1 1 1], ...
'Layer','top', ...
'Position',[0 0 1/3 1], ...
'Tag','Axes1', ...
'XColor',[0 0 0], ...
'XLim',[0.5 187.5], ...
'XLimMode','manual', ...
'YColor',[0 0 0], ...
'YDir','reverse', ...
'YLim',[0.5 269.5], ...
'YLimMode','manual', ...
'ZColor',[0 0 0],...
'createfcn','rgb=imread(''picture.bmp'');image(rgb);grid off;box on;');
if nargout > 0, fig = h0; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -