MATLAB: How to modify the values of the y axes

axesaxislegendMATLAB

Hello!
How are you?
How can I modify the values of the y axes?
For example, let's suppose that when summing a figure, I get the following (1000, 10000, 100000) on the Y axis but I want it this way (10 ^ 3, 10 ^ 4, 10 ^ 5).
How can you change this automatic matlab configuration? I also want to assign it the interval that I want.

Best Answer

Modifying them depends on the axis scale. If they are linearly-scaled, use the Exponent property in Tick Values and Labels in the NumericRuler Properties documentation. However, that does not appear to work on log-scaled axes, so you would likely need to create your own y-tick labels. Use the compose function to create them.