Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8ebc39 commit f257244Copy full SHA for f257244
1 file changed
lib/matplotlib/tests/test_axes.py
@@ -4276,6 +4276,19 @@ def _helper_y(ax):
4276
assert assert_array_equal(ax_lst[0][1].get_xlim(), orig_xlim)
4277
4278
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
4289
+ assert len(ax.yaxis.get_major_locator()()) > 2
4290
+
4291
4292
@image_comparison(baseline_images=["auto_numticks"], style='default',
4293
extensions=['png'])
4294
def test_auto_numticks():
0 commit comments