comparison cpack/dml/matlab/dml_paperfig.m @ 0:718306e29690 tip

commiting public release
author Daniel Wolff
date Tue, 09 Feb 2016 21:05:06 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:718306e29690
1 function dml_paperfig(fig,fn,fs,lw,colour,ms,lwr)
2 % dml_paperfig(fontname)
3 % dml_paperfig(fontname, fontsize)
4 % dml_paperfig(fontname, fontsize, linewidth)
5 % dml_paperfig(fontname::string, fontsize::natural, linewidth::nonneg, colour::bool)
6 % dml_paperfig ::
7 % string/'Times' ~'font name',
8 % natural/9 ~'font size',
9 % nonneg/0.4 ~'line width',
10 % bool/1 ~'colour or b/w',
11 % nonneg/4 ~'marker size'
12 % -> action handle.
13 %
14 % Sets up default linewidth and hardcopy inversion
15 % for printing to white paper at high resolution.
16 % also, sets to white background. Optional font name
17 % to used for labels etc.
18
19 figure(fig);
20 clf;
21 h=gcf;
22 whitebg(h,'w');
23 set(h,'Color','w');
24 set(h,'DefaultTextFontSize',fs);
25 set(h,'DefaultTextFontName',fn);
26 set(h,'DefaultAxesFontSize',fs);
27 set(h,'DefaultAxesFontName',fn);
28 set(h,'DefaultAxesLineWidth',lwr*lw);
29 set(h,'DefaultTextColor','k');
30 set(h,'DefaultLineLineWidth',lw);
31 set(h,'DefaultLineMarkerSize',ms);
32 set(h,'InvertHardcopy','off');
33 if ~colour,
34 set(h,'DefaultAxesColorOrder',[0 0 0]);
35 set(h,'DefaultAxesLineStyleOrder','-|:|--|-.');
36 end