title: Python Bokeh MonthsTicker yields strange tick labels
body: <p>I create figure with dates on the x axis as follows:</p>
  <pre class="lang-py prettyprint-override"><code>plot = figure(
      frame_height=300,
      x_axis_type=&quot;datetime&quot;,
      x_range=(
          datetime(2018, 9, 1),
          datetime(2020, 6, 1)
      ),
      sizing_mode='stretch_width',
  )
  
  ds = models.ColumnDataSource(data.sort_values(&quot;date&quot;))
  
  plot.add_glyph(
     ds,
     models.Line(
         x=&quot;date&quot;,
         y=&quot;y&quot;,
     ),
  )
  </code></pre>
  <p>The result looks as expected (see fig. 1). Now I want to format the xtick lables: Showing The month and year only on the first of each month:</p>
  <pre class="lang-py prettyprint-override"><code>plot.xaxis.ticker = models.tickers.MonthsTicker(months=list(range(0, 13, 1)))
  </code></pre>
  <p>But now the xtick lables looks good in many cases, but in other cases it looks like in fig. 2. Any idea what could be wrong here?</p>
  <p>I am using Python 3.10.4 and Bokeh 2.4.1 (newer version is not supported by streamline currently).</p>
  <p><a href="https://i.stack.imgur.com/10oVs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/10oVs.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/FMJQw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FMJQw.png" alt="enter image description here" /></a></p>
  <p><strong>UPDATE:</strong></p>
  <p>Everything correct with the plots and the code, as @bigreddot mentioned in the comments, the formatting can be fixed with a suitable formatter. Adding the following x axis formatter helps:</p>
  <pre class="lang-py prettyprint-override"><code>plot.xaxis.formatter = models.DatetimeTickFormatter(
      days=[&quot;%m - %Y&quot;],
      months=[&quot;%m - %Y&quot;],
  )
  </code></pre>