I wish to export figures both in eps and tiff (or png) using Matlab. Following this thread, I can change figure size and resolution conveniently. But now my problem is that the font sizes in my exported eps and tif files are very different.
For example:
1: using 300 dpi resolution to save a tif file:
r=300;
set(gcf, 'PaperUnits', 'inches', 'PaperPosition', [0 0 1024*2 1024*2]/r)
print(gcf,'-dtiff',sprintf('-r%d',r), 'contour.tif');
I get a very small font size (same applies when saving to png and jpg)
Perhaps the resolution is affecting the font size. Because when I set r=0 (i.e. resolution the same as the display), the font size is very close to what I want:
r=300; set(gcf, 'PaperUnits', 'inches', 'PaperPosition', [0 0 1024*2 1024*2]/r) print(gcf,'-dtiff',sprintf('-r%d',0), 'contour.tif');
But the problem is that such resolutions can not be published as zigzags. This can be seen when slightly zoomed in.
Just wondering how I can set all figure outputs to be consistent between formats, particularly between eps and tiffs, without using third party software (e.g. using Illustrator to export)?