Customise axis ticks and ticks labels with exponential notation
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How can I customise both axes to get this figure, with this exponential notation ?
0 Kommentare
Akzeptierte Antwort
dpb
am 13 Aug. 2022
Bearbeitet: dpb
am 13 Aug. 2022
Moral: Read doc including looking at examples...
3 Kommentare
dpb
am 16 Aug. 2022
You can make things a little less specific and typing of duplicated stuff using MATLAB array syntax --
p=[0:0.5:2.5]; % the desired powers
xtk=10.^p; % evaluate for ticks, limits
xlim([xtk(1) xtk(end)]) % set limits to match
xticks(xtk) % and the desired tick locations
xticklabels(compose('10^{%g}',p)) % and put on the annotation
This lets you set any arbitrary set of exponents in the p array; the rest then follows automagically...
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!