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 @@ -773,6 +773,19 @@ def set_figure(self, fig):
773773 """
774774 Set the `.Figure` or `.SubFigure` instance the artist belongs to.
775775
776+ .. warning::
777+
778+ This function should typically not be called by users.
779+
780+ This is a low-level API and only modifies the internal state of the
781+ Artist. Only modifying this is not enough and will typically lead
782+ to an inconsistent state, because the state of the figure has to
783+ be changed as well.
784+
785+ Users should typically instead call one of the high-level APIs, i.e.
786+ `.Figure.add_artist` or one of the Axes methods
787+ :ref:`axes-api-adding-artists`.
788+
776789 Parameters
777790 ----------
778791 fig : `~matplotlib.figure.Figure` or `~matplotlib.figure.SubFigure`
You can’t perform that action at this time.
0 commit comments