Datetime axis ticks, spacing and format

Hi,
I’m trying to produce a chart with a datetime x axis, with ticks spaced at one month using

p.xaxis.ticker = MonthsTicker(months=(4,5,6,7,8,9,10,11,12,1,2,3))

however I would also like to specify the format of the label e.g.

p.xaxis.formatter = DatetimeTickFormatter(months=["%b %y"])

iIs there a method to specify both spacing and format of Datetime axis ticks?

Ok, I’ve realised I can use;

p.xaxis.ticker = DatetimeTicker(desired_num_ticks=12)
p.xaxis.formatter = DatetimeTickFormatter(months=["%b %y"])
1 Like