8000 Merging V2.x into master. by jenshnielsen · Pull Request #5905 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Merging V2.x into master. #5905

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 6 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
Next Next commit
TST: test that number of ticks adjust with aspect
  • Loading branch information
tacaswell committed Jan 24, 2016
commit f257244dbf70d7b0119d94a65caf441855850837
13 changes: 13 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4276,6 +4276,19 @@ def _helper_y(ax):
assert assert_array_equal(ax_lst[0][1].get_xlim(), orig_xlim)


@cleanup
def test_adjust_numtick_aspect():
fig, ax = plt.subplots()
ax.yaxis.get_major_locator().set_params(nbins='auto')
ax.set_xlim(0, 1000)
ax.set_aspect('equal')
fig.canvas.draw()
assert len(ax.yaxis.get_major_locator()()) == 2
ax.set_ylim(0, 1000)
fig.canvas.draw()
assert len(ax.yaxis.get_major_locator()()) > 2


@image_comparison(baseline_images=["auto_numticks"], style='default',
extensions=['png'])
def test_auto_numticks():
Expand Down
0