How to make scientific notation appear next to each tick/label on axes instead of the top?
조회 수: 11 (최근 30일)
이전 댓글 표시
Hi everyone,
I am having the following graph where scientific notation appears on the top. How can I make the notation to appear next to each axis tick/value?
Thanks in advance.
댓글 수: 0
채택된 답변
Chunru
2021년 7월 31일
편집: Chunru
2021년 7월 31일
x = linspace(1e-6, 2e-6, 21);
plot(x)
h = gca;
h.YTickLabel = string(x*1e6)+"\times10^{-6}";
댓글 수: 4
Chunru
2021년 8월 1일
All these are "manual" and not "auto":
x = linspace(1e-6, 2e-6, 21);
plot(x)
h = gca;
h.YTickLabel = string(x*1e6)+"\times10^{-6}";
h.YTickLabel{1} ="0"; % not the correct value; for demo only
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Axis Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!