how to change the X-axis unit interval
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sehoon Chang
am 17 Jan. 2020
Beantwortet: Eunan McShane
am 17 Jan. 2020
Hello Everyone,
Does anyone know how to adjust only the Axis interval/unit, without changing the outcome (dataset) of the graph.
I have a dataset of X and Y in 15-Min interval of a half year (each approx 17500 arrays). I wish to show the X-axis in hourly interval and Y-Axis in 15 minutes interval as it is. If I carry out changes to adjust the graph in a hourly interval (approx 4400 arrays) by taking the mean value, i would be missing out the max or min value of 15 min Interval, and thus not get the same curve as displayed below. I wish keep the graph curve as it is and change only the X-axis units from 15 min (0, 2000, 4000, ..... 18000) to hourly (0.500, 1000, ... 4500).
0 Kommentare
Akzeptierte Antwort
Eunan McShane
am 17 Jan. 2020
Hey,
This might not be the cleanest solution however you can manually change the xtick labels whilst keeping them in the same location as before
Use xticks([0 2000 4000...])
and xticklabels({'0.5','1000','x'...})
If I am understanding correctly this should be a quick fix for the plot, hopefully that helps
Cheers
0 Kommentare
Weitere Antworten (0)
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!