FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Doc]: `subplot` behavior is not same as the doc reads in 3.10(stable) · Issue #29447 · matplotlib/matplotlib · GitHub

Repository navigation

[Doc]: subplot behavior is not same as the doc reads in 3.10(stable) #29447

Description

Documentation Link

https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.subplot.html

Problem

In the given doc link for version 3.10(stable), it reads

Creating a new Axes will delete any preexisting Axes that overlaps with it beyond sharing a boundary:

The code is as below

import matplotlib.pyplot as plt
# plot a line, implicitly creating a subplot(111)
plt.plot([1, 2, 3])
# now create a subplot which represents the top plot of a grid
# with 2 rows and 1 column. Since this subplot will overlap the
# first, the plot (and its Axes) previously created, will be removed
plt.subplot(211)

I tried to run the code in colab. It turns out that subplot doesn't remove previous plotting any more.

Suggested improvement

I recall the subplot behavior does remove previous plotting. Perhaps some code change alter the behavior. The current behavior is good.

I suppose the doc should be updated to match the actual behavior.

Activity

  1. added this to the v3.10.0-doc milestone on Jan 10, 2025
  2. QuLogic commented on Jan 10, 2025

    Member

    This behaviour was deprecated in #22418 and removed in #25456. The note should definitely be removed from the docs now. If you are interested, feel free to open a PR removing it if we haven't done so soon.

  3. Khushikela29 commented on Jan 11, 2025

    Contributor

    I came across this issue and would love to contribute to it. Could you please let me know if it's available for me to work on?

  4. Khushikela29 commented on Jan 15, 2025

    Contributor

    I've opened PR, can you please review it. I am open to all of your valuable suggestions :)

  5. modified the milestones: v3.10.0-doc, v3.10.1 on Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL