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

112 ビュー (過去 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?
  1 件のコメント
Leon
Leon 2020 年 6 月 10 日
It works! Many thanks for sharing this tip!

サインインしてコメントする。

採用された回答

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 Center および File Exchange2-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