Skip to content

new margin system doesn't handle negative values in bars #7175

@anntzer

Description

@anntzer

While working on #5538 (comment) (allow artists to opt-out from being considered by the autoscaler), I noticed that the new margins machinery doesn't handle negative values in bar plots very well:

from matplotlib import pyplot as plt
fig, axs = plt.subplots(1, 2)

# wanted behavior: remove the margin at y=0.
axs[0].bar(0, 1)

# unwanted behavior: remove the margin at y=-1
axs[1].bar(0, -1)

plt.show()

bar

attn @mdboom

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    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