Hello,
is there any way to force Matlab to use 35000 instead of 3.5 x 10^4 on y axis usig plot command?
My plot command creates figure that has x10^N on y axis just like shown in the attached picture.

 채택된 답변

Voss
Voss 2022년 5월 6일
편집: Voss 2022년 5월 7일

1 개 추천

yyaxis left
plot(0:1000:50000)
yyaxis right
plot(400000000:-10000000:0)
set(get(gca(),'YAxis'),'Exponent',0,'TickLabelFormat','%.0f')

댓글 수: 4

And what if plot is used inside app (UI.Axes)? The first argument in plot function would be: app.UIAxes, but gca() is not possible in that case. How I should specify Exponent in such case?
yyaxis left
plot(app.UIAxes, 0:1000:50000)
yyaxis right
plot(app.UIAxes, 400000000:-10000000:0)
Replace gca() with the handle to the uiaxes, which is app.UIAxes:
set(get(app.UIAxes,'YAxis'),'Exponent',0,'TickLabelFormat','%.0f')
Askic V
Askic V 2022년 5월 8일
Thank you very much!. It's very helpful.
Voss
Voss 2022년 5월 9일
You're welcome!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2022년 5월 6일

댓글:

2022년 5월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by