Skip to content

Commit 82080b6

Browse files
committed
BUG: Special case for MultiIndex bar plot
1 parent f2d2b08 commit 82080b6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/plotting/_matplotlib/core.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,11 @@ def __init__(self, data, **kwargs):
13171317
self.tickoffset = self.bar_width * pos
13181318
self.lim_offset = 0
13191319

1320-
self.ax_index = self.data.index
1320+
if isinstance(self.data.index, ABCMultiIndex):
1321+
# No real handling for MultiIndex yet
1322+
self.ax_index = np.arange(len(data))
1323+
else:
1324+
self.ax_index = self.data.index
13211325

13221326
def _args_adjust(self):
13231327
if is_list_like(self.bottom):
@@ -1346,6 +1350,8 @@ def _make_plot(self):
13461350
ax = self._get_ax(i)
13471351

13481352
if self.orientation == "vertical":
1353+
# import pdb
1354+
# pdb.set_trace()
13491355
ax.xaxis.update_units(self.ax_index)
13501356
self.tick_pos = ax.convert_xunits(self.ax_index)
13511357
self.ax_pos = self.tick_pos - self.tickoffset

0 commit comments

Comments
 (0)