MATLAB: Formatting y axis to exponential format

formatting y axis to exponential format

I have plotted some data using subplot in a 3 by 4 array. The y axis is from 0 to 15000 and the x axis is from 0 to 4. I know by default the plots should be in exponential format, however the first 4 subplots are not but the rest are. Why is this happening? How can I convert the y axis to exponential format? So it reads exponential to 3 decimal points?

Best Answer

ax = gca();
ax.YRuler.Exponent = 3;
ax.YRuler.TickLabelFormat = '%.3f';