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

Function recurse

lib/matplotlib/_internal_utils.py:38–56  ·  view source on GitHub ↗
(root, buf)

Source from the content-addressed store, hash-verified

36 seen = set()
37
38 def recurse(root, buf):
39 if id(root) in seen:
40 return
41 seen.add(id(root))
42 props = {}
43 label = type(root).__name__
44 if root._invalid:
45 label = f'[{label}]'
46 if root in highlight:
47 props['style'] = 'bold'
48 props['shape'] = 'box'
49 props['label'] = '"%s"' % label
50 props = ' '.join(map('{0[0]}={0[1]}'.format, props.items()))
51 buf.write(f'{id(root)} [{props}];\n')
52 for key, val in vars(root).items():
53 if isinstance(val, TransformNode) and id(root) in val._parents:
54 buf.write(f'"{id(root)}" -> "{id(val)}" '
55 f'[label="{key}", fontsize=10];\n')
56 recurse(val, buf)
57
58 buf = StringIO()
59 buf.write('digraph G {\n')

Callers 1

graphviz_dump_transformFunction · 0.70

Calls 3

joinMethod · 0.80
addMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…