()
| 1298 | |
| 1299 | |
| 1300 | def 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')) |
nothing calls this directly
no test coverage detected
searching dependent graphs…