Hiding exponent labels without scientific notation

조회 수: 10 (최근 30일)
Toby Beisly
Toby Beisly 2023년 1월 18일
댓글: Voss 2023년 1월 18일
So basically I have data in the form of linear models and am plotting it in a bunch of subplots. I cant seem to edit the x and y data (apparently the variables for the class are read-only) but I need to make x ticks more ledgible (i.e. have smaller numbers). To do this I've set the axis to use scientific notation with:
ax = gca;
ax.XAxis.Exponent = 3;
And then manually set the ticks with xticks() for each subplot.
The Problem now Is that the x10^3 label is making the graph messy but I can't figure out any way to get rid of it while keeping my xticks as I have them. Does anyone know if there is a way to do this?

채택된 답변

Voss
Voss 2023년 1월 18일
Set the xticklabels when you set the xticks.
  댓글 수: 2
Toby Beisly
Toby Beisly 2023년 1월 18일
편집: Toby Beisly 2023년 1월 18일
That's worked perfectly, thanks a lot for that, I wasn't aware xticklabels was a thing, you've saved me a lot of frustration :D.
Voss
Voss 2023년 1월 18일
You're welcome!

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by