In MATLAB one can change the font name of things such as ylabel
, xlabel
, title
, etc. of a plot, e.g.
ylabel(y_string, 'FontName', 'Palatino')
However, is it possible to change the font of the XTicks, YTicks, etc?
I've had fights with tick fonts before. I think they generally use the axes font, in which case something like:
set(gca, 'FontName', 'Palatino');
should work. If this is unsuccessful, you could try Format Tick Labels from the file exchange. It replaces the ticks with text objects, so the formatting can be completely customised as with any text object (I seem to remember having a look at it a while ago; you might need to hack around in the code to choose the font).
set(gca,'XTickLabel',{labelList}, 'FontSize',8,'FontName','Times')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With