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

Appearance settings

Axes.autoscale has scale-inconsistent margins #16539

Copy link
Copy link
Closed
@scottgigante

Description

@scottgigante
Issue body actions

Bug report

Bug summary

Autoscaling axis behaviour is inconsistent for data on very small scales

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np
x = np.repeat(np.arange(10), 10)
y = np.tile(np.arange(10), 10)

fig, axes = plt.subplots(1, 4, figsize=(16, 4))
axes[0].scatter(x, y)
axes[1].scatter(x*1e3, y*1e3)
axes[2].scatter(x*1e-3, y*1e-3)
axes[3].scatter(x*1e-6, y*1e-6)
plt.show()

Actual outcome

image

Expected outcome

The plot should scale in the same way regardless of absolute values of data range. E.g.

image

Matplotlib version

  • Operating system: Arch Linux
  • Matplotlib version: 3.0.3
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.8.1
  • Jupyter version (if applicable): jupyter-client==5.3.4 jupyter-console==6.0.0 jupyter-core==4.6.1

Installed with pacman on arch linux (installs from source.)

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.