File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed
Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ .. _Behavioral API Changes 3.5 - Axes children combined :
2+
3+ ``Axes `` children are no longer separated by type
4+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5+
6+ Formerly, `.axes.Axes ` children were separated by `.Artist ` type, into sublists
7+ such as ``Axes.lines ``. For methods that produced multiple elements (such as
8+ `.Axes.errorbar `), though individual parts would have similar *zorder *, this
9+ separation might cause them to be drawn at different times, causing
10+ inconsistent results when overlapping other Artists.
11+
12+ Now, the children are no longer separated by type, and the sublist properties
13+ are generated dynamically when accessed. Consequently, Artists will now always
14+ appear in the correct sublist; e.g., if `.axes.Axes.add_line ` is called on a
15+ `.Patch `, it will be appear in the ``Axes.patches `` sublist, _not_
16+ ``Axes.lines ``. The ``Axes.add_* `` methods will now warn if passed an
17+ unexpected type.
18+
19+ Modification of the following sublists is still accepted, but deprecated:
20+
21+ * ``Axes.artists ``
22+ * ``Axes.collections ``
23+ * ``Axes.images ``
24+ * ``Axes.lines ``
25+ * ``Axes.patches ``
26+ * ``Axes.tables ``
27+ * ``Axes.texts ``
28+
29+ To remove an Artist, use its `.Artist.remove ` method. To add an Artist, use the
30+ corresponding ``Axes.add_* `` method.
Original file line number Diff line number Diff line change 1+ Modification of ``Axes `` children sublists
2+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+ See :ref: `Behavioral API Changes 3.5 - Axes children combined ` for more
5+ information; modification of the following sublists is deprecated:
6+
7+ * ``Axes.artists ``
8+ * ``Axes.collections ``
9+ * ``Axes.images ``
10+ * ``Axes.lines ``
11+ * ``Axes.patches ``
12+ * ``Axes.tables ``
13+ * ``Axes.texts ``
14+
15+ To remove an Artist, use its `.Artist.remove ` method. To add an Artist, use the
16+ corresponding ``Axes.add_* `` method.
17+
18+ Passing incorrect types to ``Axes.add_* `` methods
19+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20+
21+ The ``Axes.add_* `` methods will now warn if passed an unexpected type. See
22+ their documentation for the types they expect.
You can’t perform that action at this time.
0 commit comments