Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MATLAB: figure fonts

Tags:

matlab

A command of the form xlabel('$<stuff>$','interpreter','latex'); will produce an axis label that is typeset by TeX using a font that is presumably ComputerModern. However, the axis tick labels (e.g., 0, 1, 2, ...) appear in the default font (Helvetica?). I would like to synchronize all the fonts in the figure (preferably to ComputerModern).

Toward that end, I presume that a command of the form set(0,'DefaultAxesFontName', '<fontname>') may be useful. However, I need to know the exact name or path of the font used by the MATLAB TeX interpreter. How can I retrieve a string value for the font name or a path pointing to the font file for the default figure font and the default TeX-interpreted font?

like image 957
user001 Avatar asked Feb 17 '12 07:02

user001


1 Answers

You could also plot the axis ticks with latex, look here: http://alex.bikfalvi.com/research/latex_in_matlab_ticks/

Actually, your command was right to mget the default font (when NOT using latex):

get(0,'defaultaxesfontname')

But I didn't find any to get the default latex font. Perhaps it would be possible by using the internal java routines (to get some ideas, look at http://undocumentedmatlab.com/)

like image 136
tim Avatar answered Sep 22 '22 18:09

tim