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

Function test_autoscale

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py:1300–1313  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1298
1299
1300def test_autoscale():
1301 fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
1302 assert ax.get_zscale() == 'linear'
1303 ax._view_margin = 0
1304 ax.margins(x=0, y=.1, z=.2)
1305 ax.plot([0, 1], [0, 1], [0, 1])
1306 assert ax.get_w_lims() == (0, 1, -.1, 1.1, -.2, 1.2)
1307 ax.autoscale(False)
1308 ax.set_autoscalez_on(True)
1309 ax.plot([0, 2], [0, 2], [0, 2])
1310 assert ax.get_w_lims() == (0, 1, -.1, 1.1, -.4, 2.4)
1311 ax.autoscale(axis='x')
1312 ax.plot([0, 2], [0, 2], [0, 2])
1313 assert ax.get_w_lims() == (0, 2, -.1, 1.1, -.4, 2.4)
1314
1315
1316@pytest.mark.parametrize('axis', ('x', 'y', 'z'))

Callers

nothing calls this directly

Calls 5

get_w_limsMethod · 0.80
subplotsMethod · 0.45
marginsMethod · 0.45
plotMethod · 0.45
autoscaleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…