MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_adjust_numtick_aspect

Function test_adjust_numtick_aspect

lib/matplotlib/tests/test_axes.py:7648–7657  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7646
7647
7648def test_adjust_numtick_aspect():
7649 fig, ax = plt.subplots()
7650 ax.yaxis.get_major_locator().set_params(nbins='auto')
7651 ax.set_xlim(0, 1000)
7652 ax.set_aspect('equal')
7653 fig.canvas.draw()
7654 assert len(ax.yaxis.get_major_locator()()) == 2
7655 ax.set_ylim(0, 1000)
7656 fig.canvas.draw()
7657 assert len(ax.yaxis.get_major_locator()()) > 2
7658
7659
7660@mpl.style.context("default")

Callers

nothing calls this directly

Calls 7

get_major_locatorMethod · 0.80
subplotsMethod · 0.45
set_paramsMethod · 0.45
set_xlimMethod · 0.45
set_aspectMethod · 0.45
drawMethod · 0.45
set_ylimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…