How to force y-axis values not to use scientific notation in axes?

조회 수: 110 (최근 30일)
Leon
Leon 2020년 6월 10일
댓글: DMJ 2025년 1월 7일
My y-axis ranges from 0.001 to 0.003, it always shows up as 1-3 x 10^-3.
How do I force it show up as 0.001 to 0.003?

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 6월 10일
편집: Ameer Hamza 2020년 6월 10일
Set exponent property to 0
ax = gca; % axes handle
ax.YAxis.Exponent = 0;
You can add these lines after creating the plot.
  댓글 수: 2
Kevin Park
Kevin Park 2021년 11월 19일
I tried this on a right-axis plot and I get the following error with this solution:
>> ax.YAxis.Exponent = 0;
Assigning to 2 elements using a simple assignment statement is not supported. Consider using comma-separated list assignment.
DMJ
DMJ 2025년 1월 7일
try: ax.YAxis(2).Exponent = 0

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by