⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fm_plotfig.m

📁 电力系统的psat
💻 M
📖 第 1 页 / 共 2 页
字号:
function fig = fm_plotfig()% FM_PLOTFIG create GUI for plotting variables%% FM_PLOTFIG()%%Author:    Federico Milano%Date:      11-Nov-2002%Update:    27-Feb-2003%Update:    11-Sep-2003%Version:   1.0.2%%E-mail:    fmilano@thunderbox.uwaterloo.ca%Web-site:  http://thunderbox.uwaterloo.ca/~fmilano%% Copyright (C) 2002-2005 Federico Milano%% This toolbox is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2.0 of the License, or% (at your option) any later version.%% This toolbox is distributed in the hope that it will be useful, but% WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU% General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this toolbox; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,% USA.global Fig Varname Syn Settings Theme Path Snapshot Hdlif isempty(Varname.bus),  fm_disp('No loaded system',2),  return,endif Fig.plot,  figure(Fig.plot)  returnendload fingerSettings.zoom = '';colori2= [ 1.0000    1.0000    0.5000;           1.0000    0.5000    1.0000;           0.5000    1.0000    1.0000;           0.5000    0.5000    1.0000;           0.5000    1.0000    0.5000;           1.0000    0.5000    0.5000;           0.7000    0.7000    0.7000];tipiplot = {'Standard Colors'; 'Black and White'; 'Black Numbers'; ...            'Black Symbols';   'Colors & Symbols'; 'Colors & Numbers'};%SSize = get(0,'ScreenSize');%Sratio = SSize(3)/SSize(4);Varname.po = [];h0 = figure('Color',Theme.color01, ...            'Units', 'normalized', ...            'Colormap',[], ...            'CreateFcn','Fig.plot = gcf;', ...            'DeleteFcn','Fig.plot = 0;', ...            'FileName','fm_plotfig', ...            'MenuBar','none', ...            'Name','PSAT Plot', ...            'NumberTitle','off', ...            'PaperPosition',[18 180 576 432], ...            'PaperType','A4', ...            'PaperUnits','points', ...            'PointerShapeCData',finger, ...            'Position',sizefig(0.7,0.7), ...            'Resize','on', ...            'ToolBar','none');fm_set colormap% Axes% --------------------------------------------------------------------------h1 = axes('Parent',h0, ...          'CreateFcn','Hdl.axeslogo = gca;', ...          'Box','on', ...          'CameraUpVector',[0 1 0], ...          'CameraUpVectorMode','manual', ...          'Color',Theme.color11, ...          'ColorOrder',colori2, ...          'HandleVisibility','on', ...          'HitTest','off', ...          'Layer','top', ...          'Position',[0.09 0.0663 0.23 0.23], ...          'Tag','Axes2', ...          'XColor',Theme.color03, ...          'XLim',[0.5 486.5], ...          'XLimMode','manual', ...          'XTickLabelMode','manual', ...          'XTickMode','manual', ...          'YColor',Theme.color03, ...          'YDir','reverse', ...          'YLim',[0.5 292.5], ...          'YLimMode','manual', ...          'YTickLabelMode','manual', ...          'YTickMode','manual', ...          'ZColor',[0 0 0]);fractalimg = ['fractal',int2str(round(rand*9))];main_logo = round(rand);if main_logo, fractalimg = 'main_logo'; endh2 = image('Parent',h1, ...           'CData',fm_mat(fractalimg), ...           'Tag','Axes2Image1', ...           'XData',[1 486], ...           'YData',[1 292]);% PSAT name, version and date in the left-bottom pictureif main_logo  color1 = [0 0 0];  color2 = [0 0.503 0];  if sum(Theme.color02) < 1    color1 = [1 1 1];    color2 = [0 1 0];  end  h1 = text(20,40,'PSAT');  set(h1, ...      'Color',color1, ...      'FontSize',12, ...      'FontWeight','bold', ...      'FontName','Times')  h1 = text(20,280,Settings.date);  set(h1, ...      'Color',color2, ...      'FontSize', 9, ...      'FontWeight','bold', ...      'FontName','Times')  h1 = text(20,240,['Version ',Settings.version]);  set(h1, ...      'Color',color2, ...      'FontSize', 9, ...      'FontWeight','bold', ...      'FontName','Times')end% Axes for plotsh1 = axes('Parent',h0, ...          'CreateFcn','Hdl.axesplot = gca;', ...          'Box','on', ...          'CameraUpVector',[0 1 0], ...          'CameraUpVectorMode','manual', ...          'Color',Theme.color04, ...          'ColorOrder',Settings.color, ...          'FontName',Theme.font01, ...          'FontSize',12, ...          'Position',[0.09 0.4050 0.4754 0.5000], ...          'Tag','Axes1', ...          'XColor',[0 0 0], ...          'XLimMode','manual', ...          'YColor',[0 0 0], ...          'YLimMode','manual', ...          'ZColor',[0 0 0]);if isunix, set(h1,'FontSize',10), end% Menu Fileh1 = uimenu('Parent',h0, ...	    'Label','File', ...	    'Tag','MenuFile');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(99)', ...	    'Label','Export data as plain text', ...	    'Tag','PushText', ...	    'Accelerator','p');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(98)', ...	    'Label','Export data as MTV plot file', ...	    'Tag','PushText', ...	    'Accelerator','v');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(97)', ...	    'Label','Export data as Matlab script', ...	    'Tag','PushText', ...	    'Accelerator','s');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(2)', ...	    'Label','Export data as Color EPS', ...	    'Tag','PushEPS', ...	    'Accelerator','e');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(2)', ...	    'Label','Export data as Metafile', ...	    'Tag','PushMeta', ...	    'Accelerator','m');if isunix, set(h2,'Enable','off'), endh2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(2)', ...	    'Label','Export data as Matlab Figure', ...	    'Tag','PushFig', ...	    'Accelerator','f');h2 = uimenu('Parent',h1, ...	    'Callback','close(gcf)', ...	    'Label','Exit', ...	    'Tag','NetSett', ...	    'Accelerator','x', ...	    'Separator','on');% Menu Ploth1 = uimenu('Parent',h0, ...	    'Label','Plot', ...	    'Tag','MenuPlot');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(1)', ...	    'Label','Plot graph', ...	    'Tag','PushPlot', ...	    'Accelerator','z');% Menu Legendh1 = uimenu('Parent',h0, ...	    'Label','Legend', ...	    'Tag','MenuLegend');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(16)', ...	    'Label','Legend on/off', ...	    'Tag','PushLegend', ...	    'Accelerator','l');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(13)', ...	    'Label','Move up name', ...	    'Tag','PushPlot', ...	    'Separator', 'on', ...	    'Accelerator','u');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(14)', ...	    'Label','Move down name', ...	    'Tag','PushPlot', ...	    'Accelerator','d');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot(4)', ...	    'Label','Edit legend name', ...	    'Tag','PushPlot', ...	    'Accelerator','t');% Listboxes% ----------------------------------------------------------------------h1 = uicontrol('Parent',h0, ...               'Units', 'normalized', ...               'BackgroundColor',Theme.color03, ...               'Callback','fm_plot(17)', ...               'CreateFcn','fm_plot(0)', ...               'FontName',Theme.font01, ...               'ForegroundColor',Theme.color10, ...               'Max',20, ...               'Position',[0.6047    0.062691     0.16237     0.84862], ...               'Style','listbox', ...               'Tag','Listbox1', ...               'Value',[]);set(h1,'Position',[0.6047  0.5070  0.1624  0.4043])h1 = uicontrol('Parent',h0, ...               'Units', 'normalized', ...               'BackgroundColor',Theme.color03, ...               'Callback','if strcmp(get(Fig.plot,''SelectionType''),''open''), fm_plot(4), end', ...               'FontName',Theme.font01, ...               'ForegroundColor',Theme.color06, ...               'Position',[0.80291     0.64679     0.15789     0.26453], ...               'Style','listbox', ...               'Tag','Listbox2', ...               'Value',1);% Push buttons for editing the plotted variablesh1 = uicontrol('Parent',h0, ...               'CData',fm_mat('plot_arrowup'), ...               'Units', 'normalized', ...               'BackgroundColor',Theme.color02, ...               'Callback','fm_plot(13)', ...               'Position',[0.80291      0.5948    0.052632    0.044343], ...               'TooltipString','Move Variable Up', ...               'Tag','Pushbutton13');h1 = uicontrol('Parent',h0, ...               'CData',fm_mat('plot_arrowdown'), ...               'Units', 'normalized', ...

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -