MATLABで出力する図を指定の寸法で出力したいとき
フォント、フォントサイズ、図の大きさを指定する方法。
以下の例ではフォントサイズを10 ptにし、図の幅を8 cmにしている。ここで8 cmとしたのは、ジャーナルがa4用紙2段組みで、左右のマージンが大きめに2.5cmずつとし、簡単のため左右の段の間のスペースは0と仮定したから。もちろんジャーナルに推奨の幅が指定してあれば、その値に変更すればよい。
% Example how to adjust your figure properties for % publication needs s = figure; % Select the default font and font size % Note: Matlab does internally round the font size % to decimal pt values set(s, 'DefaultTextFontSize', 10); % [pt] set(s, 'DefaultAxesFontSize', 10); % [pt] set(s, 'DefaultAxesFontName', 'Times New Roman'); set(s, 'DefaultTextFontName', 'Times New Roman'); % Select the preferred unit like inches, centimeters, % or pixels set(s, 'Units', 'centimeters'); pos = get(s, 'Position'); pos(3) = 8; % Select the width of the figure in [cm] pos(4) = 6; % Select the height of the figure in [cm] set(s, 'Position', pos); set(s, 'PaperType', 'a4letter'); % From SVG 1.1. Specification: % "1pt" equals "1.25px" % "1pc" equals "15px" % "1mm" would be "3.543307px" % "1cm" equals "35.43307px" % "1in" equals "90px"
参考: http://www.zhinst.com/blogs/schwizer/2010/11/plots-for-scientific-publications/