Friday 1 February 2008

Change Matlab-figures for print

If you use Matlab to generate EPS-files for inclusion in LaTeX-documents, you'll soon find that lines are too thin and text is too small. I use the following script to increase thickness and size in the current figure in Matlab:
linewidth = 2;
fontsize = 16;
fig = gcf;
h = findall(fig, 'Type', 'Text');
set(h, 'FontSize', fontsize)
h = findall(fig, 'Type', 'Axes');
set(h, 'FontSize', fontsize)
h = findall(fig, 'Type', 'Line');
set(h, 'LineWidth', linewidth)

No comments: