Skip to content

Commit e4d5040

Browse files
committed
Incorperated initial PR comments
1 parent bfb1dd1 commit e4d5040

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

pandas/plotting/_matplotlib/core.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,14 +1939,11 @@ def _make_plot(self, fig: Figure) -> None:
19391939
subplots_flag = 0
19401940

19411941
if subplots_flag & self.stacked:
1942-
sub_range = range(len(self.subplots))
1943-
ss_temp = {
1944-
x: self.subplots[x] for x in sub_range if len(self.subplots[x]) > 1
1945-
}
1946-
for k, v in ss_temp.items():
1947-
for x in v:
1948-
_stacked_subplots_ind.setdefault(int(x), k)
1949-
1942+
for i, sub_plot in enumerate(self.subplots):
1943+
if len(sub_plot) <= 1:
1944+
continue
1945+
for plot in sub_plot:
1946+
_stacked_subplots_ind[int(plot)] = i
19501947
_stacked_subplots_offsets.append([0, 0])
19511948

19521949
for i, (label, y) in enumerate(self._iter_data(data=data)):

0 commit comments

Comments
 (0)