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

Commit f257244

Browse filesBrowse files
committed
TST: test that number of ticks adjust with aspect
1 parent d8ebc39 commit f257244
Copy full SHA for f257244

File tree

Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4276,6 +4276,19 @@ def _helper_y(ax):
42764276
assert assert_array_equal(ax_lst[0][1].get_xlim(), orig_xlim)
42774277

42784278

4279+
@cleanup
4280+
def test_adjust_numtick_aspect():
4281+
fig, ax = plt.subplots()
4282+
ax.yaxis.get_major_locator().set_params(nbins='auto')
4283+
ax.set_xlim(0, 1000)
4284+
ax.set_aspect('equal')
4285+
fig.canvas.draw()
4286+
assert len(ax.yaxis.get_major_locator()()) == 2
4287+
ax.set_ylim(0, 1000)
4288+
fig.canvas.draw()
4289+
assert len(ax.yaxis.get_major_locator()()) > 2
4290+
4291+
42794292
@image_comparison(baseline_images=["auto_numticks"], style='default',
42804293
extensions=['png'])
42814294
def test_auto_numticks():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.