We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc8401a commit 3caf8e6Copy full SHA for 3caf8e6
pandas/plotting/_matplotlib/core.py
@@ -1855,7 +1855,6 @@ def __init__(
1855
self.bar_width = width
1856
self._align = align
1857
self._position = position
1858
- self.tick_pos = np.arange(len(data))
1859
1860
if is_list_like(bottom):
1861
bottom = np.array(bottom)
@@ -1868,6 +1867,12 @@ def __init__(
1868
1867
1869
MPLPlot.__init__(self, data, **kwargs)
1870
+ self.tick_pos = (
1871
+ np.array(self.ax.xaxis.convert_units(self._get_xticks()))
1872
+ if isinstance(data.index, ABCPeriodIndex)
1873
+ else np.arange(len(data))
1874
+ )
1875
+
1876
@cache_readonly
1877
def ax_pos(self) -> np.ndarray:
1878
return self.tick_pos - self.tickoffset
0 commit comments