@@ -282,16 +282,19 @@ def test_df_legend_labels_secondary_y_legend_loc(self):
282282 _check_legend_labels (ax , labels = ["a" , "b (right)" , "c" ])
283283 ax = df2 .plot (legend = False , ax = ax )
284284 _check_legend_labels (ax , labels = ["a" , "b (right)" , "c" ])
285- ax = df3 .plot (kind = "bar" , legend = True , secondary_y = "h" , legend_loc = "upper right" , ax = ax )
285+ ax = df3 .plot (
286+ kind = "bar" , legend = True , secondary_y = "h" , legend_loc = "upper right" , ax = ax
287+ )
286288 _check_legend_labels (ax , labels = ["a" , "b (right)" , "c" , "g" , "h (right)" , "i" ])
287289
288290 @pytest .mark .parametrize (
289- "kind, labels" ,
290- [
291- ("line" , ["a" , "b" ]),
292- ("bar" , ["a" , "b" ]),
293- ("scatter" , ["b" ]), # scatter(x="a", y="b") usually labels the y series
294- ])
291+ "kind, labels" ,
292+ [
293+ ("line" , ["a" , "b" ]),
294+ ("bar" , ["a" , "b" ]),
295+ ("scatter" , ["b" ]), # scatter(x="a", y="b") usually labels the y series
296+ ],
297+ )
295298 def test_across_kinds_legend_loc (self , kind , labels ):
296299 df = DataFrame ({"a" : [1 , 2 , 3 ], "b" : [3 , 2 , 1 ]})
297300 if kind == "scatter" :
@@ -302,14 +305,11 @@ def test_across_kinds_legend_loc(self, kind, labels):
302305 y = "b" ,
303306 label = "b" ,
304307 legend = True ,
305- legend_loc = "upper right"
308+ legend_loc = "upper right" ,
306309 )
307310 else :
308311 ax = _check_plot_works (
309- df .plot ,
310- kind = kind ,
311- legend = True ,
312- legend_loc = "upper right"
313- )
312+ df .plot , kind = kind , legend = True , legend_loc = "upper right"
313+ )
314314 _check_legend_labels (ax , labels = labels )
315- assert ax .get_legend () is not None
315+ assert ax .get_legend () is not None
0 commit comments