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

Method sharez

lib/mpl_toolkits/mplot3d/axes3d.py:1520–1537  ·  view source on GitHub ↗

Share the z-axis with *other*. This is equivalent to passing ``sharez=other`` when constructing the Axes, and cannot be used if the z-axis is already being shared with another Axes. Note that it is not possible to unshare axes.

(self, other)

Source from the content-addressed store, hash-verified

1518 return True
1519
1520 def sharez(self, other):
1521 """
1522 Share the z-axis with *other*.
1523
1524 This is equivalent to passing ``sharez=other`` when constructing the
1525 Axes, and cannot be used if the z-axis is already being shared with
1526 another Axes. Note that it is not possible to unshare axes.
1527 """
1528 _api.check_isinstance(Axes3D, other=other)
1529 if self._sharez is not None and other is not self._sharez:
1530 raise ValueError("z-axis is already shared")
1531 self._shared_axes["z"].join(self, other)
1532 self._sharez = other
1533 self.zaxis.major = other.zaxis.major # Ticker instances holding
1534 self.zaxis.minor = other.zaxis.minor # locator and formatter.
1535 z0, z1 = other.get_zlim()
1536 self.set_zlim(z0, z1, emit=False, auto=other.get_autoscalez_on())
1537 self.zaxis._scale = other.zaxis._scale
1538
1539 def shareview(self, other):
1540 """

Callers

nothing calls this directly

Calls 3

set_zlimMethod · 0.95
joinMethod · 0.80
get_zlimMethod · 0.80

Tested by

no test coverage detected