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

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?

 Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 10 Jun. 2020
Bearbeitet: Ameer Hamza am 10 Jun. 2020
Set exponent property to 0
ax = gca; % axes handle
ax.YAxis.Exponent = 0;
You can add these lines after creating the plot.

2 Kommentare

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.
try: ax.YAxis(2).Exponent = 0

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Version

R2020a

Gefragt:

am 10 Jun. 2020

Kommentiert:

DMJ
am 7 Jan. 2025

Community Treasure Hunt

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

Start Hunting!

Translated by