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

Method set_children

lib/matplotlib/transforms.py:178–195  ·  view source on GitHub ↗

Set the children of the transform, to let the invalidation system know which transforms can invalidate this transform. Should be called from the constructor of any transforms that depend on other transforms.

(self, *children)

Source from the content-addressed store, hash-verified

176 parent._invalidate_internal(level=level, invalidating_node=self)
177
178 def set_children(self, *children):
179 """
180 Set the children of the transform, to let the invalidation
181 system know which transforms can invalidate this transform.
182 Should be called from the constructor of any transforms that
183 depend on other transforms.
184 """
185 # Parents are stored as weak references, so that if the
186 # parents are destroyed, references from the children won't
187 # keep them alive.
188 id_self = id(self)
189 for child in children:
190 # Use weak references so this dictionary won't keep obsolete nodes
191 # alive; the callback deletes the dictionary entry. This is a
192 # performance improvement over using WeakValueDictionary.
193 ref = weakref.ref(
194 self, lambda _, pop=child._parents.pop, k=id_self: pop(k))
195 child._parents[id_self] = ref
196
197 def frozen(self):
198 """

Callers 15

__copy__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
setMethod · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected