- you could create several piecewise linear (or log) axes beside each other, and split the drawing up between them.
- you could transform your original x data in a non-linear way, and tell xticklabels to lie about what values are there, and ignore the problems you are creating for zoom or data cursors
- you could transform your original x data in a non-linear way, and tell xticklabels to lie about what values are there, and go through a bunch of trouble to get zoom and data cursors to act sensibly
- you could create a subplot or inset graph that focused on the area of greatest interest
Can my x-axis have varying scales for certain ranges of values?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Joseph Bail
am 2 Dez. 2021
Kommentiert: Joseph Bail
am 2 Dez. 2021
Is it possible to scale my x-axis so the intervals are spread further apart from each other for more time-sensitive data and closer together for the data that spans across a larger time period?
For example, I would like the distance between the x-ticks to be relatively small from 60- to 180-seconds. Conversely, I would like the gaps to be significantly wider from 180-seconds to 200-seconds so the plot is less crowded.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Dez. 2021
Is it possible to scale my x-axis so the intervals are spread further apart from each other for more time-sensitive data and closer together for the data that spans across a larger time period?
No, it is not.
Weitere Antworten (2)
the cyclist
am 2 Dez. 2021
Bearbeitet: the cyclist
am 2 Dez. 2021
Here is a simple example:
x = 1:10;
y = 2*x;
figure
plot(x,y)
xtick_loc = [0:0.5:2 3:2:7 8:0.5:10];
set(gca,'XTick',xtick_loc)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots 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!