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

Function test_inverted_zaxis

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

Source from the content-addressed store, hash-verified

1825
1826
1827def test_inverted_zaxis():
1828 fig = plt.figure()
1829 ax = fig.add_subplot(projection='3d')
1830 ax.set_zlim(0, 1)
1831 assert not ax.zaxis_inverted()
1832 assert ax.get_zlim() == (0, 1)
1833 assert ax.get_zbound() == (0, 1)
1834
1835 # Change bound
1836 ax.set_zbound((0, 2))
1837 assert not ax.zaxis_inverted()
1838 assert ax.get_zlim() == (0, 2)
1839 assert ax.get_zbound() == (0, 2)
1840
1841 # Change invert
1842 ax.invert_zaxis()
1843 assert ax.zaxis_inverted()
1844 assert ax.get_zlim() == (2, 0)
1845 assert ax.get_zbound() == (0, 2)
1846
1847 # Set upper bound
1848 ax.set_zbound(upper=1)
1849 assert ax.zaxis_inverted()
1850 assert ax.get_zlim() == (1, 0)
1851 assert ax.get_zbound() == (0, 1)
1852
1853 # Set lower bound
1854 ax.set_zbound(lower=2)
1855 assert ax.zaxis_inverted()
1856 assert ax.get_zlim() == (2, 1)
1857 assert ax.get_zbound() == (1, 2)
1858
1859
1860def test_set_zlim():

Callers

nothing calls this directly

Calls 7

figureMethod · 0.80
add_subplotMethod · 0.80
set_zlimMethod · 0.80
get_zlimMethod · 0.80
get_zboundMethod · 0.80
set_zboundMethod · 0.80
invert_zaxisMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…