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

391 vues (au cours des 30 derniers jours)
Leon
Leon le 10 Juin 2020
Commenté : Kevin Park le 19 Nov 2021
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?

Réponse acceptée

Ameer Hamza
Ameer Hamza le 10 Juin 2020
Modifié(e) : Ameer Hamza le 10 Juin 2020
Set exponent property to 0
ax = gca; % axes handle
ax.YAxis.Exponent = 0;
You can add these lines after creating the plot.
  1 commentaire
Kevin Park
Kevin Park le 19 Nov 2021
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by