10000 [WIP] Close #6968 make autoscale respect tight by jenshnielsen · Pull Request #7024 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

[WIP] Close #6968 make autoscale respect tight #7024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add test for tight=True in autoscale
  • Loading branch information
jenshnielsen committed Sep 4, 2016
commit 3c3ca8828dc92dd0a38746e7b1dcdf7d897afe58
10 changes: 10 additions & 0 deletions lib/matplotlib/tests/test_axes.py
6E80
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@ def test_autoscale_tiny_range():
ax[i].plot([0, 1], [1, 1 + y1])


@cleanup
def test_autoscale_tight():
fig, ax = plt.subplots(1, 1)
ax.plot([1, 2, 3, 4])
ax.autoscale(enable=True, axis='x', tight=False)
ax.autoscale(enable=True, axis='y', tight=True)
assert_allclose(ax.get_xlim(), (-0.15, 3.15))
assert_allclose(ax.get_ylim(), (1.0, 4.0))


@image_comparison(baseline_images=['offset_points'],
remove_text=True)
def test_basic_annotate():
Expand Down
0