Thanks to visit codestin.com
Credit goes to github.com

Skip to content

axes limits with aspect='equal' #2243

Closed
@akhmerov

Description

@akhmerov

When axes aspect='equal', an axis with zero extent might not have any padding, which results in a completely scrambled plot. To reproduce:

from matplotlib import pyplot
fig = pyplot.figure()
ax = fig.subplot(111, aspect='equal')
ax.scatter([0, 0], [1, 0])  # Change to ax.plot([0, 0]) for something that works ok
pyplot.show()  # A plot with one of the axes having size zero.

I am not completely sure what is the extent of this bug. plot of a horisontal line with aspect='equal' produces a properly padded plot.

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