How to put degree symbol in x-axis

5 vues (au cours des 30 derniers jours)
Tj R
Tj R le 8 Avr 2013
Commenté : Chad Greene le 8 Mai 2015
Dear Experts,
Thanks for your answer in advance! When i draw a x,y plot, in x-axis values says the temperature in degrees. I want to put a degree symbol for each value in x-axis in a plot. How put this degree for each value in the x-axis. Please help me in this regard.
Thank you Raj.

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 8 Avr 2013
xt=get(gca,'xtick');
for k=1:numel(xt);
xt1{k}=sprintf('%d°',xt(k));
end
set(gca,'xticklabel',xt1);
  5 commentaires
Tj R
Tj R le 17 Avr 2013
Hi Azzi and Tobias, Please have a look at my new question! Please help me in this regard.
Chad Greene
Chad Greene le 8 Mai 2015
I implemented Azzi's solution in a function called degreetick.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by