How to put degree symbol in x-axis

조회 수: 7 (최근 30일)
Tj R
Tj R 2013년 4월 8일
댓글: Chad Greene 2015년 5월 8일
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.

채택된 답변

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by