Change exponent of scientific notation on plot
조회 수: 511 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
Walter Roberson
2018년 2월 5일
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
Steven Lord
2023년 7월 25일
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
2023년 9월 1일
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.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!