How can I specify axis spacing?
37 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Susan
am 12 Jun. 2019
Kommentiert: Star Strider
am 12 Jun. 2019
Hey Guys,
I am plotting a figure that x takes values of [4 8 16 32 64 128 256 512 1024]. I use
%%
x = [4 8 16 32 64 128 256 512 1024];
plot(x, Y)
set(gca,'XTick',x)
The problem is the x-axis = [4 8 16 32 ] overlap and it's not readable. How can I fixed that? Many thanks in advance!![untitled.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/224130/untitled.jpeg)
![untitled.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/224130/untitled.jpeg)
2 Kommentare
Akzeptierte Antwort
Star Strider
am 12 Jun. 2019
One option:
x = [4 8 16 32 64 128 256 512 1024];
plot(log2(x), Y)
set(gca,'XTick',log2(x), 'XTickLabel',x)
It would be a bit easier if we knew ‘Y’, and what you wnat it to look like.
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!