MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / getdefaults

Method getdefaults

lib/matplotlib/axes/_base.py:225–238  ·  view source on GitHub ↗

If some keys in the property cycle (excluding those in the set *ignore*) are absent or set to None in the dict *kw*, return a copy of the next entry in the property cycle, excluding keys in *ignore*. Otherwise, don't advance the property cycle, and return an empty di

(self, kw, ignore=frozenset())

Source from the content-addressed store, hash-verified

223 return "k"
224
225 def getdefaults(self, kw, ignore=frozenset()):
226 """
227 If some keys in the property cycle (excluding those in the set
228 *ignore*) are absent or set to None in the dict *kw*, return a copy
229 of the next entry in the property cycle, excluding keys in *ignore*.
230 Otherwise, don't advance the property cycle, and return an empty dict.
231 """
232 defaults = self._cycler_items[self._idx]
233 if any(kw.get(k, None) is None for k in {*defaults} - ignore):
234 self._idx = (self._idx + 1) % len(self._cycler_items) # Advance cycler.
235 # Return a new dict to avoid exposing _cycler_items entries to mutation.
236 return {k: v for k, v in defaults.items() if k not in ignore}
237 else:
238 return {}
239
240
241class _process_plot_var_args:

Callers 3

_make_lineMethod · 0.80
_make_coordinatesMethod · 0.80
_make_polygonMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected