How do I control exponent in plot

When I plot a figure, Matlab automatically chooses e.g. x10^17 scale, but I would like the results to be displayed in x10^18 scale. Is there any way how can I change it without doing it manually with xtickslabel? Thanks

 Accepted Answer

You need to set the exponent property of x-axis'. Something like this
ax = gca;
ax.XAxis.Exponent = 18;

2 Comments

Thank you very much!
I am glad to be of help!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!