Answer the question
In order to leave comments, you need to log in
How to form an array of quarter start dates?
How to form an array of quarter start dates? Or how to place on the x-axis in matplotlib major marks corresponding to the beginning of the quarter?
Manually it would be:
xdate = [date(2012, 1, 1), date(2012, 4, 1), date(2012, 7, 1), date(2012, 10, 1), date(2013, 1, 1)]
xdate_f = mdates.date2num(xdate)
x_locator = ticker.FixedLocator (xdate_f)
ax.xaxis.set_major_locator(x_locator)
Maybe without a bike, ready-made functions?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question