Tagged: plots

Matlab: fixing exponential tick labels

Sometimes for large number >10000, Matlab/Octave axes ticks will appear as exponentials. You can fix this for your desired number of digits by: set(gca,’YTickLabel’,sprintf(‘%7d|’,get(gca,’YTick’))) In this example, I used 7 digits.

MATLAB: allow integer, non-exponential ylabel or xlabel

MATLAB’s default behavior, which Mathworks says is currently not changeable, is to put exponential format into xlabel and ylabel for large numbers–even integers. To allow the xlabel and ylabel to be integers (e.g. 362093), put the following line after you set xlabel or ylabel: set(gca,’YTickLabel’,sprintf(‘%7d|’,get(gca,’YTick’))) In this case, the ‘%7d’ means I want up to […]