0001 function VMT_ExportFIG(path,fignum,BkgdColor,AxColor,FigColor,FntSize,Res,Format)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 figure(fignum);
0016 set(gcf, 'PaperPositionMode', 'auto');
0017 box on
0018 if ~isempty(BkgdColor)
0019 set(gcf,'Color',BkgdColor);
0020 end
0021
0022 if ~isempty(FntSize)
0023 set(gca,'FontSize',FntSize)
0024 set(get(gca,'Title'),'FontSize',FntSize)
0025 end
0026
0027 if ~isempty(FigColor)
0028 set(gca,'Color',FigColor)
0029 end
0030
0031 if ~isempty(AxColor)
0032 set(gca,'XColor',AxColor)
0033 set(gca,'YColor',AxColor)
0034 set(gca,'ZColor',AxColor)
0035 set(findobj(gcf,'tag','Colorbar'),'FontSize',FntSize,'XColor',AxColor,'YColor',AxColor);
0036 set(get(gca,'Title'),'FontSize',FntSize,'Color',AxColor)
0037 end
0038
0039 set(gcf,'InvertHardCopy','off')
0040
0041
0042
0043 switch Format
0044 case 'png'
0045 [file,path] = uiputfile('*.png','Save file name')
0046 fileout = [path file];
0047
0048 disp(fileout)
0049 set(gcf, 'PaperPositionMode', 'auto');
0050 print(['-f' num2str(fignum)],'-dpng', '-noui', '-painters',['-r' num2str(Res)],fileout)
0051 case 'eps'
0052 [file,path] = uiputfile('*.eps','Save file name')
0053 fileout = [path file];
0054
0055 disp(fileout)
0056 set(gcf, 'PaperPositionMode', 'auto');
0057 print(['-f' num2str(fignum)],'-depsc', '-noui', '-painters',['-r' num2str(Res)],fileout)
0058
0059 otherwise
0060 [file,path] = uiputfile('*.png','Save file name')
0061 fileout = [path file];
0062
0063 disp(fileout)
0064 set(gcf, 'PaperPositionMode', 'auto');
0065 print(['-f' num2str(fignum)],'-dpng', '-noui', '-painters',['-r' num2str(Res)],fileout)
0066 end
0067
0068
0069
0070
0071
0072