Skip to content

plt.subplots for already existing Figure #5139

@anntzer

Description

@anntzer

The plt.subplots function in very practical for creating a large number of axes simultaneously, but (afaict) always puts them on a new figure, which is impractical e.g. when embedding matplotlib in a GUI, where a Figure object may be created early on and then populated with some axes later.
I would thus suggest providing the same functionality to already existing Figure objects, e.g. by moving the implementation of plt.subplots to a Figure.add_subplots (or Figure.set_subplots, as it may make sense to clear the figure before) method, and have the plt.subplots function be a thin wrapper that creates the Figure and then calls its add_subplots method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy