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

Method add_artist

lib/matplotlib/axes/_base.py:2337–2357  ·  view source on GitHub ↗

Add an `.Artist` to the Axes; return the artist. Use `add_artist` only for artists for which there is no dedicated "add" method; and if necessary, use a method such as `update_datalim` to manually update the `~.Axes.dataLim` if the artist is to be included i

(self, a)

Source from the content-addressed store, hash-verified

2335 for a in self._children)
2336
2337 def add_artist(self, a):
2338 """
2339 Add an `.Artist` to the Axes; return the artist.
2340
2341 Use `add_artist` only for artists for which there is no dedicated
2342 "add" method; and if necessary, use a method such as `update_datalim`
2343 to manually update the `~.Axes.dataLim` if the artist is to be included
2344 in autoscaling.
2345
2346 If no ``transform`` has been specified when creating the artist (e.g.
2347 ``artist.get_transform() == None``) then the transform is set to
2348 ``ax.transData``.
2349 """
2350 a.axes = self
2351 self._children.append(a)
2352 a._remove_method = self._children.remove
2353 self._set_artist_props(a)
2354 if a.get_clip_path() is None:
2355 a.set_clip_path(self.patch)
2356 self.stale = True
2357 return a
2358
2359 def add_child_axes(self, ax):
2360 """

Callers 15

indicate_insetMethod · 0.45
do_patchMethod · 0.45
quiverkeyMethod · 0.45
test_annotationbbox_gidFunction · 0.45
plot_pathsFunction · 0.45
test_legend_expandFunction · 0.45
test_twin_logscaleFunction · 0.45
test_axis_optionsFunction · 0.45

Calls 3

_set_artist_propsMethod · 0.95
get_clip_pathMethod · 0.45
set_clip_pathMethod · 0.45

Tested by 15

test_annotationbbox_gidFunction · 0.36
plot_pathsFunction · 0.36
test_legend_expandFunction · 0.36
test_twin_logscaleFunction · 0.36
test_axis_optionsFunction · 0.36
color_boxesFunction · 0.36
test_preset_clip_pathsFunction · 0.36