I'm writing a LaTeX document with \documentclass[pdftex,11pt,openright,headsepline]{book}
.
I'm now creating plots in Matlab and I want to have the axis and title of these plots to have the same font size and font as the text.
What font size and font type do I have to choose?
Best Answer
You need to make the interpreter of the text as 'latex':
to your code for plotting. This will make the interpreter for the text you write in the axes and the legend appear formatted with latex not tex (which is default). So, you get the latex type text on the axes too. You can write anything you want the way you write in latex (like $a^2$, etc.). If you further want to change the font in the latex interpreter, you can add:
and you can change the font to cmtt family, for example.
Hope it helps!
Edit:
In fact you can add:
and set the default interpreter for all strings in matlab as latex. Look here for more on defaults:
http://in.mathworks.com/help/matlab/creating_plots/default-property-values.html#f7-18841
Edit 2:
I just realized you wanted to change the font size too. Here, add something like this in the arguments:
This way you can add this extra term to the arguments wherever you want to change the font's size.