필터 지우기
필터 지우기

format the y tick labels

조회 수: 5 (최근 30일)
Seldeeno
Seldeeno 2014년 5월 6일
댓글: Seldeeno 2014년 5월 9일
hello,
How can I format the y tick labels in e-notation? (note: I entered those exact labels as numbers in the form I want them to appear) but I still want them to appear in e-notation. Is there a way to do this when I edit the figure properties?
Thanks

채택된 답변

Sara
Sara 2014년 5월 6일
If you want to change the format of the y-axis:
y = get(gca,'ytick');
yy = cell(numel(y),1);
for i = 1:numel(y)
yy{i}=sprintf('%10.3e',y(i)); %%CHOOSE PRECISION
end
set(gca,'yticklabel',yy)
  댓글 수: 16
Sara
Sara 2014년 5월 9일
It's the:
'horiz', 'left'
command, try taking it away. Note, you may want to do:
set(gca,'fontsize',8)
so that all the ticks are of the same size.
Seldeeno
Seldeeno 2014년 5월 9일
Sara, you are great. Thank you for your help :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by