Skip to content

Commit f29f046

Browse files
committed
BUG: Special case for MultiIndex bar plot
1 parent 213d4af commit f29f046

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
@@ -1329,7 +1329,11 @@ def __init__(self, data, **kwargs):
13291329
self.tickoffset = self.bar_width * pos
13301330
self.lim_offset = 0
13311331

1332-
self.ax_index = self.data.index
1332+
if isinstance(self.data.index, ABCMultiIndex):
1333+
# No real handling for MultiIndex yet
1334+
self.ax_index = np.arange(len(data))
1335+
else:
1336+
self.ax_index = self.data.index
13331337

13341338
def _args_adjust(self):
13351339
if is_list_like(self.bottom):
@@ -1358,6 +1362,8 @@ def _make_plot(self):
13581362
ax = self._get_ax(i)
13591363

13601364
if self.orientation == "vertical":
1365+
# import pdb
1366+
# pdb.set_trace()
13611367
ax.xaxis.update_units(self.ax_index)
13621368
self.tick_pos = ax.convert_xunits(self.ax_index)
13631369
self.ax_pos = self.tick_pos - self.tickoffset

0 commit comments

Comments
 (0)