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

Method clear

lib/mpl_toolkits/axisartist/floating_axes.py:239–251  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

237 return patch
238
239 def clear(self):
240 super().clear()
241 self.patch.set_transform(
242 self.get_grid_helper().grid_finder.get_transform()
243 + self.transData)
244 # The original patch is not in the draw tree; it is only used for
245 # clipping purposes.
246 orig_patch = super()._gen_axes_patch()
247 orig_patch.set_figure(self.get_figure(root=False))
248 orig_patch.set_transform(self.transAxes)
249 self.patch.set_clip_path(orig_patch)
250 self.gridlines.set_clip_path(orig_patch)
251 self.adjust_axes_lim()
252
253 def adjust_axes_lim(self):
254 bbox = self.patch.get_path().get_extents(

Callers

nothing calls this directly

Calls 8

adjust_axes_limMethod · 0.95
get_grid_helperMethod · 0.80
set_transformMethod · 0.45
get_transformMethod · 0.45
_gen_axes_patchMethod · 0.45
set_figureMethod · 0.45
get_figureMethod · 0.45
set_clip_pathMethod · 0.45

Tested by

no test coverage detected