5
votes

Could you tell me how can I change an axis "multiplier"? I mean a value I circled in the picture, let's say I would like to have x10^3 instead of x10^4.

enter image description here

4

4 Answers

1
votes

You can use the following Matlab Central tick2text: create easy-to-customize tick labels

http://www.mathworks.com/matlabcentral/fileexchange/16003-tick2text-create-easy-to-customize-tick-labels

along with the sprintf formatting.

5
votes

As of R2015b it is part of the Numeric Ruler Properties:

ax = get(gca);
ax.YAxis.Exponent = -3;
3
votes

I have little bit tricky solution:

  1. Set YTickMode to manual.
  2. Set your own YTickLabel.
  3. Place the text on top with your desired multiplier.

here is:

set(gca, 'YTickMode', 'manual');
set(gca, 'YTickLabel', get(gca,'YTick') / 1000);
text(0, 1.02 * get(gca,'YLim')(2), 'x 10^3');

Play with the multiplier 1.02 in the third line to place your text to the good place.

1
votes

Scale your data by 0.1, which gives you the multiplier you want.

Then override the tick labels so that tick 1.0 is labelled 10, etc.