I have a text data file with a time series whose entries are in the form (This is the first column):
20000101
20000102
20000103
...
20001231
20010101
...
20151231
Using this int
values results in the points being accumulated around the year with unequal spaces (This is logical since it will simply leave the corresponding gap between 20001231 to 20010101)
Now one solution to this is to use an array like this one (let's suppose I have the dates stored in an array called date
):
xaxis= np.arange(0, len(date))
The problem is that, although the plot is correct, the x axis ticks are then labeled as 0,1,2,3
...
I have been trying to modify the xticks
, but whatever I do changes the whole figure resulting in a weird plot.
What is the best solution to this?