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

Funny things happen when a rectangle with negative width/height is passed to axes() #7487

Copy link
Copy link
Closed
@anntzer

Description

@anntzer
Issue body actions

mpl 2.0b4

axes([.9, .9, -.8, -.8]); plot([1, 2])

negative-axes

Interative zooming seems to work but fails to draw the rubber-band; I suspect it is because the implementation of drag_zoom assumes that the axes' bbox extents are in the "standard" order:

            x1, y1, x2, y2 = a.bbox.extents
            x, lastx = max(min(x, lastx), x1), min(max(x, lastx), x2) # probably happens here
            y, lasty = max(min(y, lasty), y1), min(max(y, lasty), y2)

(and I'd guess there may be other issues elsewhere).

Not sure whether we want to do something about it (which may be as simple as reordering the bbox extents in the Axes constructor, or raising an exception if the width or height are negative), or just document that this is not supported and live with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: consistencyDifficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

    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.