Skip to content

Surprising/changed axis limit (autoscale) behavior #17331

@mwaskom

Description

@mwaskom

Bug report

Bug summary

The interaction of setting axis limits and autoscaling changed in 3.2 with little guidance, introducing unexpected behavior that doesn't always make sense.

Code for reproduction

Here is a plot that looks very different on 3.1.2 and 3.2.1

import numpy as np
import matplotlib.pyplot as plt
f, ax = plt.subplots()
x = np.arange(100)
y = np.random.uniform(-.1, .1, 100)
ax.scatter(x, y)
assert ax._autoscaleYon
ax.set_ylim((-.5, .5), auto=None)

Actual outcome

On 3.2.1

image

Expected outcome

On 3.1.2

image

Matplotlib version

  • Operating system: macOS
  • Matplotlib version: 3.2.1
  • Matplotlib backend (print(matplotlib.get_backend())): pylab inline
  • Python version: 3.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    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