@@ -165,23 +165,23 @@ def set_prop_cycle(self, *args, **kwargs):
165
165
def __call__ (self , * args , ** kwargs ):
166
166
if self .axes .xaxis is not None and self .axes .yaxis is not None :
167
167
xunits = kwargs .pop ('xunits' , self .axes .xaxis .units )
168
-
169
168
if self .axes .name == 'polar' :
170
169
xunits = kwargs .pop ('thetaunits' , xunits )
170
+ if xunits != self .axes .xaxis .units :
171
+ self .axes .xaxis .set_units (xunits )
171
172
172
173
yunits = kwargs .pop ('yunits' , self .axes .yaxis .units )
173
-
174
174
if self .axes .name == 'polar' :
175
175
yunits = kwargs .pop ('runits' , yunits )
176
-
177
- if xunits != self .axes .xaxis .units :
178
- self .axes .xaxis .set_units (xunits )
179
-
180
176
if yunits != self .axes .yaxis .units :
181
177
self .axes .yaxis .set_units (yunits )
182
178
183
- ret = self ._grab_next_args (* args , ** kwargs )
184
- return ret
179
+ while args :
180
+ this , args = args [:2 ], args [2 :]
181
+ if args and isinstance (args [0 ], str ):
182
+ this += args [0 ],
183
+ args = args [1 :]
184
+ yield from self ._plot_args (this , kwargs )
185
185
186
186
def get_next_color (self ):
187
187
"""Return the next color in the cycle."""
@@ -382,14 +382,6 @@ def _plot_args(self, tup, kwargs):
382
382
ret .append (seg )
383
383
return ret
384
384
385
- def _grab_next_args (self , * args , ** kwargs ):
386
- while args :
387
- this , args = args [:2 ], args [2 :]
388
- if args and isinstance (args [0 ], str ):
389
- this += args [0 ],
390
- args = args [1 :]
391
- yield from self ._plot_args (this , kwargs )
392
-
393
385
394
386
class _AxesBase (martist .Artist ):
395
387
"""
0 commit comments