@@ -321,7 +321,7 @@ def legend(self, *args, **kwargs):
321321 * args ,
322322 ** kwargs )
323323 if len (extra_args ):
324- _api .nargs_error ('legend' , '0-2' , len (args ))
324+ raise _api .nargs_error ('legend' , '0-2' , len (args ))
325325 self .legend_ = mlegend .Legend (self , handles , labels , ** kwargs )
326326 self .legend_ ._remove_method = self ._remove_legend
327327 return self .legend_
@@ -3005,7 +3005,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
30053005 which inspired this method.
30063006 """
30073007 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 ))
30093009 _api .check_in_list (['horizontal' , 'vertical' ], orientation = orientation )
30103010
30113011 if len (args ) == 1 :
@@ -6422,7 +6422,7 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
64226422 else :
64236423 raise TypeError ("arguments do not match valid signatures" )
64246424 else :
6425- _api .nargs_error ('pcolorfast' , '1 or 3' , len (args ))
6425+ raise _api .nargs_error ('pcolorfast' , '1 or 3' , len (args ))
64266426
64276427 if style == "quadmesh" :
64286428 # data point in each cell is value at lower left corner
0 commit comments