TickLabelInterpreter axis ticks bold
22 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Red Li
el 21 de Jun. de 2018
Respondida: Abdulrahman BIN Rabiah
el 14 de Feb. de 2019
I want to apply latex interpreter to axis numbers set(gca,'TickLabelInterpreter','latex'); But I can not make the axis numbers bold, set(gca,'fontweight','bold') doesn't work. Does anybody know how to solve this problem?
0 comentarios
Respuesta aceptada
Jan
el 21 de Jun. de 2018
Editada: Jan
el 21 de Jun. de 2018
With the LaTeX interpreter you need to define the label as '{\boldmath$\alpha$}' to get a bold face font.
[EDITED]:
axesH = gca;
axesH.XAxis.TickLabelInterpreter = 'latex'
axesH.XAxis.TickLabelFormat = '\\textbf{%g}';
Two \ are required, because at first sprintf is applied and then the LaTeX interpreter.
2 comentarios
Jan
el 21 de Jun. de 2018
"It does not work" is not a useful explanation of what's going wrong. I do not see how you tried to implement my suggestion.
The bold-face of the axes' font weight are applied only if the text interpreter is set to 'none':
set(gca,'TickLabelInterpreter','none');
set(gca,'fontweight','bold','fontsize',12);
For an example with LaTeX see [EDITED] in my answer.
Más respuestas (1)
Ver también
Categorías
Más información sobre Grid Lines, Tick Values, and Labels en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!