Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7e2ff00

Browse filesBrowse files
committed
Document API changes for Axes sublists.
1 parent 2d1bac1 commit 7e2ff00
Copy full SHA for 7e2ff00

File tree

Expand file treeCollapse file tree

2 files changed

+52
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+52
-0
lines changed
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. _api-changes-behavior-axes-children-combination:
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.
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Modification of ``Axes`` children sublists
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
See `api-changes-behavior-axes-children-combination` for more information;
5+
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.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.