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

📄 fm_plotfig.m

📁 用于电力系统的一个很好的分析软件
💻 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:    Federico.Milano@uclm.es%Web-site:  http://www.uclm.es/area/gsee/Web/Federico%% Copyright (C) 2002-2008 Federico Milanoglobal Fig DAE Settings Theme Path Snapshot Hdl Busif ~Bus.n  fm_disp('No loaded system',2)  returnendif Fig.plot,  figure(Fig.plot)  fm_plot('initlist')  fm_plot('initxlabel')  fm_plot('listvars')  returnendif strcmp(Settings.platform,'MAC')  dm = 0.008;else  dm = 0;endSettings.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'};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', ...            '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 200.5], ...          'XLimMode','manual', ...          'XTickLabelMode','manual', ...          'XTickMode','manual', ...          'YColor',Theme.color03, ...          'YDir','reverse', ...          'YLim',[0.5 150.5], ...          'YLimMode','manual', ...          'YTickLabelMode','manual', ...          'YTickMode','manual', ...          'ZColor',[0 0 0]);if ispc, set(gca,'XColor',[126 157 185]/255,'YColor',[126 157 185]/255), endset(h0,'Units','pixels')figdim = get(h0,'Position');set(h0,'Units','normalized')xd = round(figdim(3)*0.23);yd = round(figdim(4)*0.23);fractalimg = ['alhambra',int2str(round(rand*8))];main_logo = 0; %round(rand);if main_logo  a = fm_mat('main_logo');else  a = imread([Path.images,fractalimg,'.jpg'],'jpg');endtry  if Settings.hostver >= 7.4    a = imresize(a,[yd xd],'bilinear');  else    a = imresize(a,[yd xd],'bilinear',11);  endcatch  % imresize is not available!!!endh2 = image('Parent',h1, ...           'CData',a, ...           'Tag','Axes2Image1', ...           'XData',[1 200], ...           'YData',[1 150]);% 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(15,40,'PSAT');  set(h1, ...      'Color',color1, ...      'FontSize',12, ...      'FontWeight','bold', ...      'FontName','Times')  h1 = text(15,140,Settings.date);  set(h1, ...      'Color',color2, ...      'FontSize', 9, ...      'FontWeight','bold', ...      'FontName','Times')  h1 = text(15,120,['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 exporttext', ...	    'Label','Export data as plain text', ...	    'Tag','PushText', ...	    'Accelerator','p');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot exportmtv', ...	    'Label','Export data as MTV plot file', ...	    'Tag','PushText', ...	    'Accelerator','v');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot exportscript', ...	    'Label','Export data as Matlab script', ...	    'Tag','PushText', ...	    'Accelerator','s');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot export', ...	    'Label','Export data as Color EPS', ...	    'Tag','PushEPS', ...	    'Accelerator','e');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot export', ...	    'Label','Export data as Metafile', ...	    'Tag','PushMeta', ...	    'Accelerator','m');if isunix, set(h2,'Enable','off'), endh2 = uimenu('Parent',h1, ...	    'Callback','fm_plot export', ...	    '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 plotvars', ...	    'Label','Plot graph', ...	    'Tag','PushPlot', ...	    'Accelerator','z');% Menu Optionsh1 = uimenu('Parent',h0, ...	    'Label','Options', ...	    'Tag','MenuOptions');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot limits', ...	    'Label','Plot voltage limits', ...	    'Tag','PlotVLim', ...	    'Accelerator','a');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot limits', ...	    'Label','Normalize line flows', ...	    'Tag','NormSij', ...	    'Accelerator','n');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot lowestv', ...	    'Label','Plot 3 lowest voltages', ...	    'Tag','LowestV', ...	    'Accelerator','1');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot highestv', ...	    'Label','Plot 3 highest voltages', ...	    'Tag','HighestV', ...	    'Accelerator','2');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot highests', ...	    'Label','Plot 3 highest flows', ...	    'Tag','HighestS', ...	    'Accelerator','3');% Menu Legendh1 = uimenu('Parent',h0, ...	    'Label','Legend', ...	    'Tag','MenuLegend');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot togglelegend', ...	    'Label','Legend on/off', ...	    'Tag','PushLegend', ...	    'Accelerator','l');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot moveup', ...	    'Label','Move up name', ...	    'Tag','PushPlot', ...	    'Separator', 'on', ...	    'Accelerator','u');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot movedown', ...	    'Label','Move down name', ...	    'Tag','PushPlot', ...	    'Accelerator','d');h2 = uimenu('Parent',h1, ...	    'Callback','fm_plot editvarname', ...	    'Label','Edit legend name', ...	    'Tag','PushPlot', ...	    'Accelerator','t');% Listboxes% ----------------------------------------------------------------------h1 = uicontrol('Parent',h0, ...               'Units', 'normalized', ...               'BackgroundColor',Theme.color03, ...               'Callback','fm_plot listvars', ...               'CreateFcn','fm_plot initlist', ...               'FontName',Theme.font01, ...               'ForegroundColor',Theme.color10, ...               'Max',20, ...               'Position',[0.6047  0.5070  0.1624  0.4043], ...               'Style','listbox', ...               'Tag','Listbox1', ...               'Value',[]);string = ['if strcmp(get(Fig.plot,''SelectionType''),', ...          '''open''), fm_plot(''editvarname''), end'];h1 = uicontrol('Parent',h0, ...               'Units', 'normalized', ...               'BackgroundColor',Theme.color03, ...               'Callback',string, ...               'CreateFcn','set(gcbo,''String'',[''[1] '',Varname.uvars{Varname.idx(1)}])', ...               'FontName',Theme.font01, ...

⌨️ 快捷键说明

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