forked frommatplotlib/matplotlib
- Notifications
You must be signed in to change notification settings - Fork0
Commit0db9c6c
committed
MNT: Remove deprecated axes kwargs collision detection
In Matplotlib 2.1, the behavior of reusing existing axes whencreated with the same arguments was deprecated (seematplotlib#9037). Thisbehavior is now removed.The behavior of the functions to create new axes (`pyplot.axes`,`pyplot.subplot`, `figure.Figure.add_axes`,`figure.Figure.add_subplot`) has changed. In the past, thesefunctions would detect if you were attempting to create Axes withthe same keyword arguments as already-existing axes in the currentfigure, and if so, they would return the existing Axes. Now, thesefunctions will always create new Axes. A special exception is`pyplot.subplot`, which will reuse any existing subplot with amatching subplot spec. However, if there is a subplot with amatching subplot spec, then that subplot will be returned, even ifthe keyword arguments with which it was created differ.Correspondingly, the behavior of the functions to get the currentAxes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,these functions accepted keyword arguments. If the keywordarguments matched an already-existing Axes, then that Axes wouldbe returned, otherwise new Axes would be created with thosekeyword arguments. Now, the keyword arguments are only consideredif there are no axes at all in the current figure. In a futurerelease, these functions will not accept keyword arguments at all.Fixesmatplotlib#18832.1 parent7d64909 commit0db9c6c
File tree
9 files changed
+246
-286
lines changed- doc
- api/next_api_changes/deprecations
- users/next_whats_new
- lib
- matplotlib
- axes
- cbook
- tests
- mpl_toolkits/tests
9 files changed
+246
-286
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 144 | + | |
155 | 145 | | |
156 | 146 | | |
157 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
609 | 612 | | |
610 | 613 | | |
611 | 614 | | |
| |||
0 commit comments
Comments
(0)