Change exponent of scientific notation on plot

525 vues (au cours des 30 derniers jours)
Thales
Thales le 5 Fév 2018
How do I change the scientific notation exponent on the x-axis of my plot?
What I would like to do was to change the x-axis labels, that are [0:0.5:2]*1e5, to [0:50:200]*1e3, ie, change the exponent of the scientific notation to 3 and rewrite the numbers to match it. The x-axis labels would be something like:
0.0000e+000 50.0000e+003 100.0000e+003 150.0000e+003 200.0000e+003
But the '×10^3' would be only on the right end of the x-axis.

Réponse acceptée

Walter Roberson
Walter Roberson le 5 Fév 2018
  4 commentaires
Steven Lord
Steven Lord le 25 Juil 2023
I expect that code to work in release R2023a as it has since that property was introduced. What does "does not work" mean in this context?
  • Do you receive warning and/or error messages? If so the full and exact text of those messages (all the text displayed in orange and/or red in the Command Window) may be useful in determining what's going on and how to avoid the warning and/or error.
  • Does it do something different than what you expected? If so, what did it do and what did you expect it to do?
  • Did MATLAB crash? If so please send the crash log file (with a description of what you were running or doing in MATLAB when the crash occured) to Technical Support so we can investigate.
Can you show a small example of what you tried where this code didn't work as you expected?
Ford Creighton
Ford Creighton le 1 Sep 2023
Hi @Steven Lord, is there a way to change the axes exponents within AppBuilder axes properties, or do I have to manually code this in during app startup? Thanks.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by