How to plot values in lower and higher x-values with putting a break in the plot for middle x-values?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi there,
Say I want to plot for x values = [1 2 3 4 5 1001 1002 1003 1004 1005] with corresponding y - values = [ 100 200 150 250 50 150 100 500 300 400] with spline type plot. There will be a huge gap in the x-axis here. In many situation, it is someting like we want to zap middle data range by putting a 'break' sign along the x-axis value. So, how can I zap or omit all middle x- and hence y- values as well and put a 'break' symbol in the plot? The plot must be a single plot.
Thank you very much!
0 Kommentare
Antworten (2)
dpb
am 10 Jan. 2021
MATLAB doesn't know about broken axes, unfortunately. You might explore the FEX and see if there are any user submissions there to simulate the feature.
Otherwise, plot y against the ordinal position vector and then use the XTickLabel property to label the x axis ticks with actual values.
0 Kommentare
Image Analyst
am 10 Jan. 2021
There are several submission in the File Exchange that do this:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Axis Labels 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!