Skip to content

Deprecate axes collision #9037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 15, 2017
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 15, 2017

Extends #9034. See discussion at #9024.

Feel free to push or force-push additional fixes to this PR.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer force-pushed the deprecate-axes-collision branch from bdd5a3b to d84c9ba Compare August 15, 2017 11:54
@tacaswell tacaswell merged commit 3769792 into matplotlib:master Aug 15, 2017
@anntzer anntzer deleted the deprecate-axes-collision branch August 15, 2017 23:08
@QuLogic QuLogic added this to the 2.1 (next point release) milestone Aug 16, 2017
dstansby pushed a commit to dstansby/matplotlib that referenced this pull request Aug 16, 2017
This was referenced Sep 16, 2017
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Nov 19, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior is now removed.

Functions that create new axes (`axes`, `add_axes`, `subplot`, etc.)
will now always create new axes, regardless of whether the kwargs
passed to them match already existing axes.

Passing kwargs to `gca` is deprecated. If `gca` is called with
kwargs that do not match the current axes, then an exception is
raised.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Nov 19, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior is now removed.

Functions that create new axes (`axes`, `add_axes`, `subplot`, etc.)
will now always create new axes, regardless of whether the kwargs
passed to them match already existing axes.

Passing kwargs to `gca` is deprecated. If `gca` is called with
kwargs that do not match the current axes, then an exception is
raised.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Nov 19, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior is now removed.

Functions that create new axes (`axes`, `add_axes`, `subplot`, etc.)
will now always create new axes, regardless of whether the kwargs
passed to them match already existing axes.

Passing kwargs to `gca` is deprecated. If `gca` is called with
kwargs that do not match the current axes, then an exception is
raised.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Nov 19, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior is now removed.

Functions that create new axes (`axes`, `add_axes`, `subplot`, etc.)
will now always create new axes, regardless of whether the kwargs
passed to them match already existing axes.

Passing kwargs to `gca` is deprecated. If `gca` is called with
kwargs that do not match the current axes, then an exception is
raised.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Nov 19, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior is now removed.

Functions that create new axes (`axes`, `add_axes`, `subplot`, etc.)
will now always create new axes, regardless of whether the kwargs
passed to them match already existing axes.

Passing kwargs to `gca` is deprecated. If `gca` is called with
kwargs that do not match the current axes, then an exception is
raised.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Nov 19, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior is now removed.

Functions that create new axes (`axes`, `add_axes`, `subplot`, etc.)
will now always create new axes, regardless of whether the kwargs
passed to them match already existing axes.

Passing kwargs to `gca` is deprecated. If `gca` is called with
kwargs that do not match the current axes, then an exception is
raised.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Dec 6, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior is now removed.

Functions that create new axes (`axes`, `add_axes`, `subplot`, etc.)
will now always create new axes, regardless of whether the kwargs
passed to them match already existing axes.

Passing kwargs to `gca` is deprecated. If `gca` is called with
kwargs that do not match the current axes, then an exception is
raised.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Dec 19, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Dec 19, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Dec 19, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Dec 20, 2020
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Jan 7, 2021
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Jan 11, 2021
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Jan 19, 2021
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Jan 19, 2021
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Jan 19, 2021
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Jan 19, 2021
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
lpsinger added a commit to lpsinger/matplotlib that referenced this pull request Jan 21, 2021
In Matplotlib 2.1, the behavior of reusing existing axes when
created with the same arguments was deprecated (see matplotlib#9037). This
behavior 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, these
functions would detect if you were attempting to create Axes with
the same keyword arguments as already-existing axes in the current
figure, and if so, they would return the existing Axes. Now, these
functions will always create new Axes. A special exception is
`pyplot.subplot`, which will reuse any existing subplot with a
matching subplot spec. However, if there is a subplot with a
matching subplot spec, then that subplot will be returned, even if
the keyword arguments with which it was created differ.

Correspondingly, the behavior of the functions to get the current
Axes (`pyplot.gca`, `figure.Figure.gca`) has changed. In the past,
these functions accepted keyword arguments. If the keyword
arguments matched an already-existing Axes, then that Axes would
be returned, otherwise new Axes would be created with those
keyword arguments. Now, the keyword arguments are only considered
if there are no axes at all in the current figure. In a future
release, these functions will not accept keyword arguments at all.

Fixes matplotlib#18832.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants