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

Method draw

lib/mpl_toolkits/axes_grid1/parasite_axes.py:126–143  ·  view source on GitHub ↗
(self, renderer)

Source from the content-addressed store, hash-verified

124 return ax2
125
126 def draw(self, renderer):
127 orig_children_len = len(self._children)
128
129 locator = self.get_axes_locator()
130 if locator:
131 pos = locator(self, renderer)
132 self.set_position(pos, which="active")
133 self.apply_aspect(pos)
134 else:
135 self.apply_aspect()
136
137 rect = self.get_position()
138 for ax in self.parasites:
139 ax.apply_aspect(rect)
140 self._children.extend(ax.get_children())
141
142 super().draw(renderer)
143 del self._children[orig_children_len:]
144
145 def clear(self):
146 super().clear()

Callers 9

test_divider_append_axesFunction · 0.45
test_inset_axes_completeFunction · 0.45
test_hbox_dividerFunction · 0.45
test_vbox_dividerFunction · 0.45
test_auto_adjustableFunction · 0.45
test_removalFunction · 0.45

Calls 5

get_axes_locatorMethod · 0.45
set_positionMethod · 0.45
apply_aspectMethod · 0.45
get_positionMethod · 0.45
get_childrenMethod · 0.45

Tested by 9

test_divider_append_axesFunction · 0.36
test_inset_axes_completeFunction · 0.36
test_hbox_dividerFunction · 0.36
test_vbox_dividerFunction · 0.36
test_auto_adjustableFunction · 0.36
test_removalFunction · 0.36