FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

autoscale differences between 1.5.1 and 2.0.0b3 · Issue #6968 · matplotlib/matplotlib · GitHub

Repository navigation

autoscale differences between 1.5.1 and 2.0.0b3 #6968

Closed

Description

Based on description of tight ("If True, set view limits to data limits"), I would have expected MPL 1.5.1 behavior (see code and image below). Though perhaps there was a little margin added intentionally?

Edit: I see this first part was intended, as change #5583. See second issue below.

import matplotlib as mpl

plt.plot([1,2,3,4])
plt.autoscale(axis='both', tight=True)

plt.show()


Aside from this, MPL 1.x use to conveniently adjust view limits for log and symlog when tight autoscaling was not on, but MPL 2 does not seem to do this anymore.

This actually also looks like a result of #5583. I would argue the previous behavior was actually desirable in many instances. Is there a way to recover it?

import matplotlib as mpl

plt.plot([1,2,3,4])

ax = plt.gca()
ax.set_xscale('log')
ax.set_yscale('log')

plt.show()

Python 2.7 and 3.4
Using tkagg backend.
Windows 7

Activity

  1. changed the title [-]autoscale differences between 1.5.2 and 2.0.0b3[/-] [+]autoscale differences between 1.5.1 and 2.0.0b3[/+] on Aug 23, 2016
  2. added this to the milestone on Aug 23, 2016
  3. added 2 commits that reference this issue on Sep 4, 2016
    7139671
    ee2c1b4
  4. self-assigned this
    on Sep 4, 2016
  5. added a commit that references this issue on Sep 4, 2016
    6b72ae6
  6. added
    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
    and removed on Nov 11, 2016
  7. efiring commented on Nov 13, 2016

    Member

    @LevN0 in answer to your question, with v2.x if you start with mpl.style.use('classic') you will get the same autoscaling as with 1.5. You can also use a context manager, or you can just set the relevant rcParams:

    mpl.rcParams['axes.autolimit_mode'] = 'round_numbers'
    mpl.rcParams['axes.xmargin'] = 0
    mpl.rcParams['axes.ymargin'] = 0
  8. added a commit that references this issue on Nov 14, 2016
    80f868a
  9. added a commit that references this issue on Nov 14, 2016
    6ed32d3
  10. NelleV commented on Nov 14, 2016

    Member

    Closed in #7458

  11. LevN0 commented on Nov 14, 2016

    ContributorAuthor

    @efiring Thank you. I tried axes.autolimit_mode and it seems to result in the MPL 1.5 behavior for that aspect recovered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL