📄 pfigure.m
字号:
function figure_handle=pfigure% Function creates a figure window in portrait mode with label and% time stamp. Also adds a "Save plot" menu button.%% Written by: E. R.: January 19, 2007% Last updated: February 1, 2008: change position of plot label and date%% figure_handle=pfigure% OUTPUT% figure_handle figure handle% UPDATE HISTORY% August 31, 2007: Add "save plot" menu button% November 25, 2007: delete figure handle if there is no output% argument and no figure label global PARAMS4PROJECT S4M WFrun_presets_if_neededfigure_handle=figure;set(figure_handle,'Position',S4M.portrait,'PaperPosition',[0.8 0.5 6.5,8.0], ... 'PaperOrientation','portrait','Color','w', ... 'InvertHardcopy',S4M.invert_hardcopy); axis_handle=gca; % Save handle to current axesbgGrayfigure_export_menuif ~isyes(S4M.figure_labels) % Do not create labels in the lower left and % lower right of a figure if nargout == 0 clear figure_handle end returnend% Create new axes for labelh=axes('Position',[0 0 1 1],'Visible','off');% Create label for lower right-hand sideif ~isempty(S4M.plot_label) txt=strrep(S4M.plot_label,'\_','#&%'); txt=strrep(txt,'_','\_'); txt=strrep(txt,'#&%','\_');else txt='';endif ~isempty(PARAMS4PROJECT) && isfield(PARAMS4PROJECT,'name') && ~isempty(txt) txt={strrep(PARAMS4PROJECT.name,'_','\_');txt};elseif ~isempty(WF) && ~isempty(txt) txt={strrep(WF.name,'_','\_');txt};end% Add date/time stamp and plot labeltry text(0.8,0.02,S4M.time,'FontSize',7); catchendtry text(0.04,0.02,txt,'FontSize',7);catchend% Make axis handle invisible so that the axis cannot be used by accidentset(h,'HandleVisibility','off');axes(axis_handle); % Make original axes the current axesset(axis_handle,'Position',[0.14,0.085,0.79,0.79],'FontName',S4M.font_name);if nargout == 0 clear figure_handleend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -