Skip to content

Unable to disable autoscaling in pyplot.plot #17955

@neilpeterman

Description

@neilpeterman

Bug report

Bug summary

Arguments to disable autoscaling are not working, so despite e.g. scalex=False the horizontal axis is re-scaled.

Code for reproduction

import matplotlib.pyplot as plt

plt.plot([0, 2], [0, 2], '-')
plt.plot([0, 10], [1, 1], '-', scalex=False)

Actual outcome

Output in-line in jupyter notebook:
image

Expected outcome

Expected autoscaling only for the first call, so the xscale is just a bit padded from [0, 2]. This works as expected in matplotlib==3.1.3:
image

Matplotlib version

  • Operating system: Ubuntu 18.04.3
  • Matplotlib version: 3.3.0
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.6.8
  • Jupyter version (if applicable): 1.0.0
  • Other libraries: N/A

Tools installed with pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions