I'm trying to create a graph where the x-axis is made up of a 1×144 list of 10 minute intervals
ex: [10,20,30,40,50,…,1440]
The y-axis is made up of temperatures found at each 10 minute interval
x = time_10(1:144);y = temp_out(1:144);plot(x,y, '-', 'linewidth', 2)
However on the graph it breaks the x-axis up by intervals of 500 and displays: 0,500,1000,1500.
When I changed the ticks to display the x-axis in 60 min intervals from 0:1440. It looked too cluttered.
xticks(0:60:1440)
Is there someway I can divide each tick by 60 so the x-axis would appear clearer and be in terms of 1 hour intervals over 24 hours?
I tried changing the range of the x-axis, but that gave me a "vectors must be same length" error:
x = (1:24);
I've also tried:
xticks(0:60/60:1440)xticks(0:60:1440/60)xticks((0:60:1440)/60)
But quickly found it just ticked every minute or only the first 24 minutes.
Best Answer