@@ -190,7 +190,8 @@ def maybe_color_bp(self, bp) -> None:
190
190
191
191
def _make_plot (self , fig : Figure ) -> None :
192
192
if self .subplots :
193
- self ._return_obj = pd .Series (dtype = object )
193
+ obj_axes = []
194
+ obj_labels = []
194
195
195
196
# Re-create iterated data if `by` is assigned by users
196
197
data = (
@@ -221,10 +222,12 @@ def _make_plot(self, fig: Figure) -> None:
221
222
ax , y , column_num = i , return_type = self .return_type , ** kwds
222
223
)
223
224
self .maybe_color_bp (bp )
224
- self ._return_obj [label ] = ret
225
+ obj_axes .append (ret )
226
+ obj_labels .append (label )
225
227
_set_ticklabels (
226
228
ax = ax , labels = ticklabels , is_vertical = self .orientation == "vertical"
227
229
)
230
+ self ._return_obj = pd .Series (obj_axes , index = obj_labels , dtype = object )
228
231
else :
229
232
y = self .data .values .T
230
233
ax = self ._get_ax (0 )
@@ -400,7 +403,7 @@ def plot_group(keys, values, ax: Axes, **kwds):
400
403
ax .set_ylabel (pprint_thing (ylabel ))
401
404
402
405
keys = [pprint_thing (x ) for x in keys ]
403
- values = [np . asarray ( remove_na_arraylike (v ), dtype = object ) for v in values ]
406
+ values = [remove_na_arraylike (v ) for v in values ]
404
407
bp = ax .boxplot (values , ** kwds )
405
408
if fontsize is not None :
406
409
ax .tick_params (axis = "both" , labelsize = fontsize )
0 commit comments