Borrar filtros
Borrar filtros

How to add subscript in xticklabels?

7 visualizaciones (últimos 30 días)
SM
SM el 9 de Nov. de 2021
Respondida: Star Strider el 9 de Nov. de 2021
I have used code like
xticklabels({'SA(MO)$_{2}$H','RSMOH','MODA'})
in which 2 should be subscript of (MO), but failed. Can you please help me? Thanks!

Respuestas (1)

Star Strider
Star Strider el 9 de Nov. de 2021
Try something like this —
figure
Ax = axes;
plot(Ax, 0:2, randn(1,3))
xticks(0:2)
xticklabels({'SA(MO)$_{2}$H','RSMOH','MODA'})
Ax.TickLabelInterpreter = 'latex';
.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by