File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -450,6 +450,7 @@ Units
450450 Axes.convert_yunits
451451 Axes.have_units
452452
453+ .. _axes-api-adding-artists :
453454
454455Adding artists
455456==============
Original file line number Diff line number Diff line change @@ -767,6 +767,19 @@ def set_figure(self, fig):
767767 """
768768 Set the `.Figure` or `.SubFigure` instance the artist belongs to.
769769
770+ .. warning::
771+
772+ This function should typically not be called by users.
773+
774+ This is a low-level API and only modifies the internal state of the
775+ Artist. Only modifying this is not enough and will typically lead
776+ to an inconsistent state, because the state of the figure has to
777+ be changed as well.
778+
779+ Users should typically instead call one of the high-level APIs, i.e.
780+ `.Figure.add_artist` or one of the Axes methods
781+ :ref:`axes-api-adding-artists`.
782+
770783 Parameters
771784 ----------
772785 fig : `~matplotlib.figure.Figure` or `~matplotlib.figure.SubFigure`
You can’t perform that action at this time.
0 commit comments