<p dir="auto"><strong>UPD</strong> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="464857873" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/14705" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/14705/hovercard" href="https://github.com/matplotlib/matplotlib/pull/14705">#14705</a> fixes this issue</p>
<p dir="auto">Unfortunately I can't provide a full MWE at this moment (I'll try to find time and update with code), but I thought reporting will still be good anyway.</p>
<p dir="auto">I want to use cyrillic text ticks in order to debug a speech recognition system. I plot either the top-1 character prediction or top-2. I use mutli-line ticks in order to plot two character predictions. In top-2 mode the labels get cut off, including the label that's on the first line.</p>
<p dir="auto">When top-1 prediction is plotted:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1041752/67884763-a8d00b80-fb46-11e9-8f6b-a13f120758e1.png"><img src="https://user-images.githubusercontent.com/1041752/67884763-a8d00b80-fb46-11e9-8f6b-a13f120758e1.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">When top-2 predictions are plotted (note the cut-off labels).<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1041752/67884776-ae2d5600-fb46-11e9-9c0e-88dd98ec332c.png"><img src="https://user-images.githubusercontent.com/1041752/67884776-ae2d5600-fb46-11e9-9c0e-88dd98ec332c.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">The labels are not affected by any randomness, the only difference is using ticks of 1 character or 3 characters (counting the newline character). Essentially I'd use an appropriate <code class="notranslate">rotation</code> mode if it existed.</p>
<p dir="auto">Potentially related issue with a MWE: <a href="https://stackoverflow.com/questions/53942480/how-can-i-change-the-text-direction-of-tick-labels-in-matplotlib" rel="nofollow">https://stackoverflow.com/questions/53942480/how-can-i-change-the-text-direction-of-tick-labels-in-matplotlib</a></p>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>

<p dir="auto">Similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="50689483" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/3872" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/3872/hovercard" href="https://github.com/matplotlib/matplotlib/issues/3872">#3872</a></p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<p dir="auto">I can't attach a CSV or an .ipynb, but I'll zip them up together and attach that.<br>
<a href="https://github.com/matplotlib/matplotlib/files/3980465/span_where.zip">span_where.zip</a></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="collection = collections.BrokenBarHCollection.span_where(df.index,ymin=0,ymax=df['numeric_col'].max(),
                                                         where=df['bool_col']==True,
                                                            facecolor='g', 
                                                            edgecolor='red', 
                                                            linewidth=2.0, linestyle='--', 
                                                            alpha=0.2, 
                                                            label='span')
axes.add_collection(collection)"><pre class="notranslate"><span class="pl-s1">collection</span> <span class="pl-c1">=</span> <span class="pl-s1">collections</span>.<span class="pl-v">BrokenBarHCollection</span>.<span class="pl-en">span_where</span>(<span class="pl-s1">df</span>.<span class="pl-s1">index</span>,<span class="pl-s1">ymin</span><span class="pl-c1">=</span><span class="pl-c1">0</span>,<span class="pl-s1">ymax</span><span class="pl-c1">=</span><span class="pl-s1">df</span>[<span class="pl-s">'numeric_col'</span>].<span class="pl-en">max</span>(),
                                                         <span class="pl-s1">where</span><span class="pl-c1">=</span><span class="pl-s1">df</span>[<span class="pl-s">'bool_col'</span>]<span class="pl-c1">==</span><span class="pl-c1">True</span>,
                                                            <span class="pl-s1">facecolor</span><span class="pl-c1">=</span><span class="pl-s">'g'</span>, 
                                                            <span class="pl-s1">edgecolor</span><span class="pl-c1">=</span><span class="pl-s">'red'</span>, 
                                                            <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">2.0</span>, <span class="pl-s1">linestyle</span><span class="pl-c1">=</span><span class="pl-s">'--'</span>, 
                                                            <span class="pl-s1">alpha</span><span class="pl-c1">=</span><span class="pl-c1">0.2</span>, 
                                                            <span class="pl-s1">label</span><span class="pl-c1">=</span><span class="pl-s">'span'</span>)
<span class="pl-s1">axes</span>.<span class="pl-en">add_collection</span>(<span class="pl-s1">collection</span>)</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-9-264dcc0313f6&gt; in &lt;module&gt;
      6                                                             linewidth=2.0, linestyle='--',
      7                                                             alpha=0.2,
----&gt; 8                                                             label='span')
      9 axes.add_collection(collection)

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in span_where(x, ymin, ymax, where, **kwargs)
   1131 
   1132         collection = BrokenBarHCollection(
-&gt; 1133             xranges, [ymin, ymax - ymin], **kwargs)
   1134         return collection
   1135 

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in __init__(self, xranges, yrange, **kwargs)
   1111                   (xmin + xwidth, ymin),
   1112                   (xmin, ymin)] for xmin, xwidth in xranges]
-&gt; 1113         PolyCollection.__init__(self, verts, **kwargs)
   1114 
   1115     @staticmethod

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in __init__(self, verts, sizes, closed, **kwargs)
   1044         Collection.__init__(self, **kwargs)
   1045         self.set_sizes(sizes)
-&gt; 1046         self.set_verts(verts, closed)
   1047         self.stale = True
   1048 

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in set_verts(self, verts, closed)
   1065                     codes[0] = mpath.Path.MOVETO
   1066                     codes[-1] = mpath.Path.CLOSEPOLY
-&gt; 1067                     self._paths.append(mpath.Path(xy, codes))
   1068                 else:
   1069                     self._paths.append(mpath.Path(xy))

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/path.py in __init__(self, vertices, codes, _interpolation_steps, closed, readonly)
    125             and codes as read-only arrays.
    126         &quot;&quot;&quot;
--&gt; 127         vertices = _to_unmasked_float_array(vertices)
    128         if vertices.ndim != 2 or vertices.shape[1] != 2:
    129             raise ValueError(

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/cbook/__init__.py in _to_unmasked_float_array(x)
   1388         return np.ma.asarray(x, float).filled(np.nan)
   1389     else:
-&gt; 1390         return np.asarray(x, float)
   1391 
   1392 

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/numpy/core/_asarray.py in asarray(a, dtype, order)
     83 
     84     &quot;&quot;&quot;
---&gt; 85     return array(a, dtype, copy=False, order=order)
     86 
     87 

TypeError: float() argument must be a string or a number, not 'Timestamp'"><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-9-264dcc0313f6&gt; in &lt;module&gt;
      6                                                             linewidth=2.0, linestyle='--',
      7                                                             alpha=0.2,
----&gt; 8                                                             label='span')
      9 axes.add_collection(collection)

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in span_where(x, ymin, ymax, where, **kwargs)
   1131 
   1132         collection = BrokenBarHCollection(
-&gt; 1133             xranges, [ymin, ymax - ymin], **kwargs)
   1134         return collection
   1135 

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in __init__(self, xranges, yrange, **kwargs)
   1111                   (xmin + xwidth, ymin),
   1112                   (xmin, ymin)] for xmin, xwidth in xranges]
-&gt; 1113         PolyCollection.__init__(self, verts, **kwargs)
   1114 
   1115     @staticmethod

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in __init__(self, verts, sizes, closed, **kwargs)
   1044         Collection.__init__(self, **kwargs)
   1045         self.set_sizes(sizes)
-&gt; 1046         self.set_verts(verts, closed)
   1047         self.stale = True
   1048 

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/collections.py in set_verts(self, verts, closed)
   1065                     codes[0] = mpath.Path.MOVETO
   1066                     codes[-1] = mpath.Path.CLOSEPOLY
-&gt; 1067                     self._paths.append(mpath.Path(xy, codes))
   1068                 else:
   1069                     self._paths.append(mpath.Path(xy))

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/path.py in __init__(self, vertices, codes, _interpolation_steps, closed, readonly)
    125             and codes as read-only arrays.
    126         """
--&gt; 127         vertices = _to_unmasked_float_array(vertices)
    128         if vertices.ndim != 2 or vertices.shape[1] != 2:
    129             raise ValueError(

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/matplotlib/cbook/__init__.py in _to_unmasked_float_array(x)
   1388         return np.ma.asarray(x, float).filled(np.nan)
   1389     else:
-&gt; 1390         return np.asarray(x, float)
   1391 
   1392 

/opt/anaconda3/envs/eda/lib/python3.7/site-packages/numpy/core/_asarray.py in asarray(a, dtype, order)
     83 
     84     """
---&gt; 85     return array(a, dtype, copy=False, order=order)
     86 
     87 

TypeError: float() argument must be a string or a number, not 'Timestamp'
</code></pre></div>
<p dir="auto"><strong>Expected outcome</strong></p>

<p dir="auto">this works:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="axes = df['numeric_col'].plot() 
axes.fill_between(df.index,0,df['numeric_col'].max(),where=df['bool_col']==False, interpolate=True, color='lightskyblue')"><pre class="notranslate"><span class="pl-s1">axes</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>[<span class="pl-s">'numeric_col'</span>].<span class="pl-en">plot</span>() 
<span class="pl-s1">axes</span>.<span class="pl-en">fill_between</span>(<span class="pl-s1">df</span>.<span class="pl-s1">index</span>,<span class="pl-c1">0</span>,<span class="pl-s1">df</span>[<span class="pl-s">'numeric_col'</span>].<span class="pl-en">max</span>(),<span class="pl-s1">where</span><span class="pl-c1">=</span><span class="pl-s1">df</span>[<span class="pl-s">'bool_col'</span>]<span class="pl-c1">==</span><span class="pl-c1">False</span>, <span class="pl-s1">interpolate</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'lightskyblue'</span>)</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5185401/71121883-323daa80-2194-11ea-97a8-5f069d03eabd.png"><img src="https://user-images.githubusercontent.com/5185401/71121883-323daa80-2194-11ea-97a8-5f069d03eabd.png" alt="Screen Shot 2019-12-17 at 5 39 52 PM" style="max-width: 100%;"></a></p>

<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>
<p dir="auto">Operating system: Mac OS 10.14.6</p>
</li>
<li>
<p dir="auto">Matplotlib version: 3.1.1</p>
</li>
<li>
<p dir="auto">Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://ipykernel.pylab.backend_inline</p>
</li>
<li>
<p dir="auto">Python version: python 3.7.5</p>
</li>
<li>
<p dir="auto">Jupyter version (if applicable):<br>
jupyter                   1.0.0                    py37_7<br>
jupyter_client            5.3.4                    py37_0<br>
jupyter_console           6.0.0                    py37_0<br>
jupyter_core              4.6.1                    py37_0</p>
</li>
<li>
<p dir="auto">Other libraries:<br>
pandas                    0.25.3</p>
</li>
</ul>

<p dir="auto">installed with conda</p>

<p dir="auto">conda default channel</p>