|
47 | 47 | % *** VERSION 0.92 ******************************************** |
48 | 48 | % 19/01/06: bug fix of defalt plotting parameters |
49 | 49 | % *** VERSION 0.93 ******************************************** |
| 50 | +% 24/07/17: saving as PDF rather than PS |
| 51 | +% *** VERSION 0.94 ******************************************** |
50 | 52 | % |
51 | 53 | % *********************************************************************** |
52 | 54 |
|
|
57 | 59 | % *** INITIALIZE ******************************************************** % |
58 | 60 | % |
59 | 61 | % set version! |
60 | | -par_ver = 0.93; |
| 62 | +par_ver = 0.94; |
61 | 63 | % set function name |
62 | 64 | str_function = mfilename; |
63 | 65 | str_function(find(str_function(:)=='_')) = '-'; |
64 | 66 | % close open windows |
65 | 67 | close all; |
66 | 68 | % set date |
67 | 69 | str_date = [datestr(date,11), datestr(date,5), datestr(date,7)]; |
68 | | -% determine whcih stupid version of MUTLAB we are using |
69 | | -tmp_mutlab = version('-release'); |
70 | | -str_mutlab = tmp_mutlab(1:4); |
71 | | -par_mutlab = str2num(str_mutlab); |
72 | 70 | % check for make_cmap |
73 | 71 | if ~(exist('make_cmap', 'file') == 2) |
74 | 72 | disp([' ']); |
|
83 | 81 | data_in = PDATAIN; |
84 | 82 | data_lims = PDATALIMS; |
85 | 83 | data_col = PDATACOL; |
86 | | -if ~exist('OSTRUCTTEXT','var'), |
| 84 | +if ~exist('OSTRUCTTEXT','var') |
87 | 85 | str_title = 'hello'; |
88 | 86 | str_filename = ['myplot' str_date]; |
89 | 87 | end |
|
106 | 104 | % set n colors |
107 | 105 | c_max =256; |
108 | 106 | % set color scale |
109 | | -if isempty(data_col), |
110 | | - colorbar_name = 'parula'; |
| 107 | +if isempty(data_col) |
| 108 | + colorbar_name = 'inferno'; |
111 | 109 | else |
112 | 110 | colorbar_name = data_col; |
113 | 111 | end |
|
230 | 228 | % NOTE: explicitly specify renderer is using useless recent version |
231 | 229 | scrsz = get(0,'ScreenSize'); |
232 | 230 | hfig = figure('Position',[((1 - plot_dscrsz)/2)*plot_dscrsz*scrsz(3) (1 - plot_dscrsz)*plot_dscrsz*scrsz(4) 1.1*plot_dscrsz*scrsz(4) plot_dscrsz*scrsz(4)]); |
233 | | -if (par_mutlab > 2015), hfig.Renderer='Painters'; end |
234 | 231 | clf; |
235 | 232 | % define plotting regions |
236 | 233 | fh(1) = axes('Position',[0 0 1 1],'Visible','off'); |
|
252 | 249 | caxis([data_min data_max]); |
253 | 250 | set(gca,'PlotBoxAspectRatio',[1.0 plot_xy_scaling*1.0 1.0]); |
254 | 251 | axis([0.0 double(xmax) 0.0 double(ymax)]); |
255 | | -if (par_mutlab > 2016), |
256 | | - xtickangle(par_xtickangle); |
257 | | -end |
| 252 | +xtickangle(par_xtickangle); |
258 | 253 | set(gca,'XLabel',text('String',str_xlabel,'FontSize',18),'XTick',[0.5:1:xmax-0.5],'XTickLabel',v_xticks,'fontsize',9*(12/xmax)^0.5); |
259 | 254 | set(gca,'YLabel',text('String',str_ylabel,'FontSize',18),'YTick',[0.5:1:ymax-0.5],'YTickLabel',v_yticks,'fontsize',9*(12/ymax)^0.5); |
260 | 255 | set(gca,'TickDir','out'); |
|
326 | 321 | % *** PRINT PLOT ******************************************************** % |
327 | 322 | % |
328 | 323 | set(gcf,'CurrentAxes',fh(1)); |
329 | | -set(gcf,'renderer','painters'); |
330 | | -if (par_mutlab > 2015), |
331 | | - print('-dpsc2', '-bestfit', [str_filename '.ps']); |
332 | | -else |
333 | | - print('-dpsc2', [str_filename '.ps']); |
334 | | -end |
| 324 | +exportgraphics(gcf,[str_filename '.' str_date '.pdf'],'BackgroundColor','none','ContentType','vector'); |
335 | 325 | % |
336 | 326 | % *********************************************************************** % |
337 | 327 |
|
|
0 commit comments