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 limits (in old "round_numbers" mode) affected by floating point issues #5767

Copy link
Copy link
Closed
@anntzer

Description

@anntzer
Issue body actions

Compare

In [1]: plt.plot([0, .2]); plt.ylim()
Out[1]: (0.0, 0.20000000000000001)

In [2]: plt.plot([-.1, .2]); plt.ylim()
Out[2]: (-0.10000000000000001, 0.25)

Note how the upper ylim changes from 0.2 to 0.25. This behavior is even tested (indirectly) by test_axes:test_vline_limit. I intend to change this behavior in my work on #5738/#5755 so that the upper limit is actually 0.2 in both cases (basically relying on matplotlib.ticker.Base, which has been written exactly to handle this).

Thoughts?

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.