annotate 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
rev   line source
Daniel@0 1 function dml_paperfig(fig,fn,fs,lw,colour,ms,lwr)
Daniel@0 2 % dml_paperfig(fontname)
Daniel@0 3 % dml_paperfig(fontname, fontsize)
Daniel@0 4 % dml_paperfig(fontname, fontsize, linewidth)
Daniel@0 5 % dml_paperfig(fontname::string, fontsize::natural, linewidth::nonneg, colour::bool)
Daniel@0 6 % dml_paperfig ::
Daniel@0 7 % string/'Times' ~'font name',
Daniel@0 8 % natural/9 ~'font size',
Daniel@0 9 % nonneg/0.4 ~'line width',
Daniel@0 10 % bool/1 ~'colour or b/w',
Daniel@0 11 % nonneg/4 ~'marker size'
Daniel@0 12 % -> action handle.
Daniel@0 13 %
Daniel@0 14 % Sets up default linewidth and hardcopy inversion
Daniel@0 15 % for printing to white paper at high resolution.
Daniel@0 16 % also, sets to white background. Optional font name
Daniel@0 17 % to used for labels etc.
Daniel@0 18
Daniel@0 19 figure(fig);
Daniel@0 20 clf;
Daniel@0 21 h=gcf;
Daniel@0 22 whitebg(h,'w');
Daniel@0 23 set(h,'Color','w');
Daniel@0 24 set(h,'DefaultTextFontSize',fs);
Daniel@0 25 set(h,'DefaultTextFontName',fn);
Daniel@0 26 set(h,'DefaultAxesFontSize',fs);
Daniel@0 27 set(h,'DefaultAxesFontName',fn);
Daniel@0 28 set(h,'DefaultAxesLineWidth',lwr*lw);
Daniel@0 29 set(h,'DefaultTextColor','k');
Daniel@0 30 set(h,'DefaultLineLineWidth',lw);
Daniel@0 31 set(h,'DefaultLineMarkerSize',ms);
Daniel@0 32 set(h,'InvertHardcopy','off');
Daniel@0 33 if ~colour,
Daniel@0 34 set(h,'DefaultAxesColorOrder',[0 0 0]);
Daniel@0 35 set(h,'DefaultAxesLineStyleOrder','-|:|--|-.');
Daniel@0 36 end