# Exponent on top or on the right of the axis, control, turn off?

307 Ansichten (letzte 30 Tage)
Bob photonics am 12 Jul. 2019
Kommentiert: Bob photonics am 12 Jul. 2019
Hi everyone,
If I'm plotting small numbers with power of 10^-4 or smaller then on my Y-axis matlab puts a x10^-4 on top of the axis. It does the same for the X-axis but on the right. see the image:
I have not been able to find a way to control this and have matlab write these exponents in my Y tick labels EXCEPT for manual methods.
I'm not looking for manual methods, I'm looking for a way where I don't have to enter my labels by hand for each and every graph as my graphs have different limits and thus different tick labels. So either I move it to the axis or I would like to move the location of where it's shown.
I prefer having the ticks on my axis read 2e-7, 4e-7, ..., 1.2e-6, 1.4e-6 (or 12e-7, 14e-7). The reason is simple, I think it prevents misinterpretation and makes the plots clearer and it doesn't get in the way of the title.
Please let me know what would be possible in this regard.
This is how I set the limits of each graph at the moment btw:
neffsubset1=neff(:,ixT,:,mode); %4-D matrix, extracting relevant data
% Set y axes
ymin=real(min(imag(neffsubset1(imag(neffsubset1)>0)))); %finding the minimum value for the imaginary part in the subset
ymax=real(max(imag(neffsubset1(imag(neffsubset1)>0)))); %find max value
ylim([ymin ymax])
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Akzeptierte Antwort

Stephen23 am 12 Jul. 2019
Either set the number format or the exponent:
##### 1 Kommentar-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden
Bob photonics am 12 Jul. 2019
Thank you very much

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Axis Labels finden Sie in Help Center und File Exchange

R2018a

### Community Treasure Hunt

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

Start Hunting!

Translated by