Skip to content

Commit a994fe5

Browse files
committed
BUG: Special case for MultiIndex bar plot
1 parent a802e31 commit a994fe5

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
@@ -1326,7 +1326,11 @@ def __init__(self, data, **kwargs):
13261326
self.tickoffset = self.bar_width * pos
13271327
self.lim_offset = 0
13281328

1329-
self.ax_index = self.data.index
1329+
if isinstance(self.data.index, ABCMultiIndex):
1330+
# No real handling for MultiIndex yet
1331+
self.ax_index = np.arange(len(data))
1332+
else:
1333+
self.ax_index = self.data.index
13301334

13311335
def _args_adjust(self):
13321336
if is_list_like(self.bottom):
@@ -1355,6 +1359,8 @@ def _make_plot(self):
13551359
ax = self._get_ax(i)
13561360

13571361
if self.orientation == "vertical":
1362+
# import pdb
1363+
# pdb.set_trace()
13581364
ax.xaxis.update_units(self.ax_index)
13591365
self.tick_pos = ax.convert_xunits(self.ax_index)
13601366
self.ax_pos = self.tick_pos - self.tickoffset

0 commit comments

Comments
 (0)