|
"Cristina " <canavesi@optics.rochester.edu.mapson> wrote in message
<fnt8hq$5k4$1@fred.mathworks.com>...
> I've just started using MatLab R2007a Student Version on Mac OS X (Tiger)
and I
> have problems with plots. This code produces very bad looking labels on
the
> axis (on screen and when printing):
>
> x = [0:10];
> plot(x);
> xlabel('\phi(\tau)');
> ylabel('\phi(\tau)');
>
> I had no problems with the same code on Windows. Any advice?
Hi Cristina,
yes, the default figure labeling on a Mac is quite ugly. Two things you can do:
1. change the default font size/type to something nicer (eg 12 points); you
can do this by inserting the line(s)
>>set(0,'defaultTextFontSize',12)
>>set(0,'defaultTextFontFace','Arial')
in the startup.m file (it's a file in the Matlab path that gets executed at
startup)
2. when using the figure in a document, do NOT copy and paste, but rather
create a file; the best format for printing is EPS. The following lines of code
get the job done nicely:
>>set(gcf,'paperPositionMode','auto') % make the print as big as the figure
>>print(gcf, '-depsc2', 'myPic.eps') % create EPS (help print for details)
Use another format, such as png or tiff, for bitmap figures (for example for
presentations):
>>set(gcf,'paperPositionMode','auto') % make the print as big as the figure
>>print(gcf, '-dpng','-r300', 'myPic.png') % create PNG at 300dpi (help print
for details)
If you put these instructions in a script or in a shortcut, it's almost as fast as
copy and paste... (I have a script which resizes the figure and change the
fonts before creating the file, so all my figures are uniformly formatted).
Also, for equations and other symbols, you can get better results using the
LaTeX interpreter instead of the standard TeX. Your figure looks much better
like this:
>> x = [0:10];
>> plot(x);
>> xlabel('vertical: $\phi(\tau)$','interpreter','LaTeX'); % notice the $ $
>> ylabel('horizontal: $\phi(\tau)$','interpreter','LaTeX');
Hope this helps,
Lorenzo
|