()
| 1858 | |
| 1859 | |
| 1860 | def test_set_zlim(): |
| 1861 | fig = plt.figure() |
| 1862 | ax = fig.add_subplot(projection='3d') |
| 1863 | assert np.allclose(ax.get_zlim(), (-1/48, 49/48)) |
| 1864 | ax.set_zlim(zmax=2) |
| 1865 | assert np.allclose(ax.get_zlim(), (-1/48, 2)) |
| 1866 | ax.set_zlim(zmin=1) |
| 1867 | assert ax.get_zlim() == (1, 2) |
| 1868 | |
| 1869 | with pytest.raises( |
| 1870 | TypeError, match="Cannot pass both 'lower' and 'min'"): |
| 1871 | ax.set_zlim(bottom=0, zmin=1) |
| 1872 | with pytest.raises( |
| 1873 | TypeError, match="Cannot pass both 'upper' and 'max'"): |
| 1874 | ax.set_zlim(top=0, zmax=1) |
| 1875 | |
| 1876 | |
| 1877 | @check_figures_equal() |
nothing calls this directly
no test coverage detected
searching dependent graphs…