Skip to content

Idea: unite xlim and set_xlim to same function #15938

@kolibril13

Description

@kolibril13

I think it is confusing that the limits are normally set by xlim and in subplots by set_xlim.
Would it not be nice to use the same name ax.xlim(0,1) for subplots ?

import numpy as np
import matplotlib.pyplot as plt
plt.figure(1)
plt.xlim(0, 1)
plt.plot([1, 2])

fix, ax = plt.subplots()
ax.set_xlim(0, 1) ##  why not ax.xlim(0,1) ?
ax.plot([1, 2])

Metadata

Metadata

Assignees

No one assigned

    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