@@ -321,7 +321,7 @@ def legend(self, *args, **kwargs):
321
321
* args ,
322
322
** kwargs )
323
323
if len (extra_args ):
324
- _api .nargs_error ('legend' , '0-2' , len (args ))
324
+ raise _api .nargs_error ('legend' , '0-2' , len (args ))
325
325
self .legend_ = mlegend .Legend (self , handles , labels , ** kwargs )
326
326
self .legend_ ._remove_method = self ._remove_legend
327
327
return self .legend_
@@ -3005,7 +3005,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
3005
3005
which inspired this method.
3006
3006
"""
3007
3007
if not 1 <= len (args ) <= 3 :
3008
- _api .nargs_error ('stem' , '1-3' , len (args ))
3008
+ raise _api .nargs_error ('stem' , '1-3' , len (args ))
3009
3009
_api .check_in_list (['horizontal' , 'vertical' ], orientation = orientation )
3010
3010
3011
3011
if len (args ) == 1 :
@@ -6422,7 +6422,7 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6422
6422
else :
6423
6423
raise TypeError ("arguments do not match valid signatures" )
6424
6424
else :
6425
- _api .nargs_error ('pcolorfast' , '1 or 3' , len (args ))
6425
+ raise _api .nargs_error ('pcolorfast' , '1 or 3' , len (args ))
6426
6426
6427
6427
if style == "quadmesh" :
6428
6428
# data point in each cell is value at lower left corner
0 commit comments