|
| 1 | +Changes to behavior of Axes creation methods (gca(), add_axes(), add_subplot()) |
| 2 | +------------------------------------------------------------------------------- |
| 3 | + |
| 4 | +The behavior of the functions to create new axes (``.pyplot.axes``, |
| 5 | +``.pyplot.subplot``, ``.figure.Figure.add_axes``, |
| 6 | +``.figure.Figure.add_subplot``) has changed. In the past, these functions would |
| 7 | +detect if you were attempting to create Axes with the same keyword arguments as |
| 8 | +already-existing axes in the current figure, and if so, they would return the |
| 9 | +existing Axes. Now, these functions will always create new Axes. A special |
| 10 | +exception is ``.pyplot.subplot``, which will reuse any existing subplot with a |
| 11 | +matching subplot spec. However, if there is a subplot with a matching subplot |
| 12 | +spec, then that subplot will be returned, even if the keyword arguments with |
| 13 | +which it was created differ. |
| 14 | + |
| 15 | +Correspondingly, the behavior of the functions to get the current Axes |
| 16 | +(``.pyplot.gca``, ``.figure.Figure.gca``) has changed. In the past, these |
| 17 | +functions accepted keyword arguments. If the keyword arguments matched an |
| 18 | +already-existing Axes, then that Axes would be returned, otherwise new Axes |
| 19 | +would be created with those keyword arguments. Now, the keyword arguments are |
| 20 | +only considered if there are no axes at all in the current figure. In a future |
| 21 | +release, these functions will not accept keyword arguments at all. |
0 commit comments