Effacer les filtres
Effacer les filtres

How to make only some part of a y axis label italic?

902 vues (au cours des 30 derniers jours)
Sidd
Sidd le 5 Avr 2018
I am trying to label my y axis with something called a glass transition temperature. This is expressed in text as Tg (where the T needs to be italic, but the g is regular font and subscripted). I have tried ylabel('\it T_g ,[°C]') but it italicizes the entire axis label.
Any idea how to do this?

Réponse acceptée

Bart Kieviet
Bart Kieviet le 11 Sep 2018
Modifié(e) : Bart Kieviet le 11 Sep 2018
It's:
ylabel('{\it T}_g ,[°C]')
So with {} around the text that needs to be italic.
  5 commentaires
Bart Kieviet
Bart Kieviet le 8 Jan 2021
Modifié(e) : Bart Kieviet le 8 Jan 2021
If I run your code on Matlab 2020a, I get the following:
Is this not what is required?
Code run:
xlabel('$x_3$ (kg/ms$^2$)','fontsize',16,'Interpreter','latex')
mukul chankaya
mukul chankaya le 2 Mar 2021
Thankyou very much, used the same command for .fig file (propoerty editor) it worked. Thanks again

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by