Change exponent of scientific notation on plot

514 visualizaciones (últimos 30 días)
Thales
Thales el 5 de Feb. de 2018
Comentada: Ford Creighton el 1 de Sept. de 2023
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.

Respuesta aceptada

Walter Roberson
Walter Roberson el 5 de Feb. de 2018
  4 comentarios
Steven Lord
Steven Lord el 25 de Jul. de 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 el 1 de Sept. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by