Please see the attached image. How can i add such degree symbol in a matlab figure?

댓글 수: 2

Adam Danz
Adam Danz 2021년 9월 1일
It looks like this plot was generated using the Mapping Toolbox.
i have no idea about this tool. Is there any alternative method? Please help me. It’s urgent

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

 채택된 답변

the cyclist
the cyclist 2021년 9월 1일

0 개 추천

The degree symbol is ASCII character 176. So, here is a simple way:
% Plot some random data
plot(rand(100,1),rand(100,1),'.')
% Set the tick positions, and label them with degrees
set(gca,'XTick',[0 0.5 1],'XTickLabel',{['98',char(176),'E'],['99',char(176),'E'],['100',char(176),'E']})
There are more sophisticated ways to build a longer vector (but using the same basic idea), e.g. using sprintf.

댓글 수: 2

It's wirking thaks
Pham
Pham 2025년 11월 16일
이동: Stephen23 2025년 11월 16일
it worked, many thanks

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

추가 답변 (2개)

Voss
Voss 2021년 9월 1일

1 개 추천

xt = get(gca,'XTick');
xtl = arrayfun(@(x)sprintf('%d\\circE',x),xt,'UniformOutput',false);
set(gca,'XTickLabel',xtl);
Fangjun Jiang
Fangjun Jiang 2021년 9월 1일
편집: Fangjun Jiang 2021년 9월 1일

0 개 추천

title('9^oE')
text(0.5,0.5,'9^oE')
xticklabels({'0^oE','1^oE'})
doc title
search for "superscript"

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2021년 9월 1일

이동:

2025년 11월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by