Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

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

Closed
Milestone
@mocheng

Description

@mocheng

Documentation Link

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

Problem

In the givendoc 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 removedplt.subplot(211)

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

image

Suggested improvement

I recall thesubplot 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp