Change exponent of scientific notation on plot
377 views (last 30 days)
Show older comments
How do I change the scientific notation exponent on the x-axis of my plot?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169928/image.png)
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.
0 Comments
Accepted Answer
Walter Roberson
on 5 Feb 2018
If you are using R2014b or later, see https://www.mathworks.com/help/matlab/creating_plots/change-tick-marks-and-tick-labels-of-graph-1.html#d119e2453
4 Comments
Steven Lord
on 25 Jul 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
on 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.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!