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

Method _get_w_centers_ranges

lib/mpl_toolkits/mplot3d/axes3d.py:2024–2041  ·  view source on GitHub ↗

Get 3D world centers and axis ranges in transformed coordinates. For non-linear scales (log, symlog, etc.), centers and ranges are computed in transformed coordinates to ensure uniform zoom/pan behavior.

(self)

Source from the content-addressed store, hash-verified

2022 cz - dz*scale_z/2, cz + dz*scale_z/2)
2023
2024 def _get_w_centers_ranges(self):
2025 """
2026 Get 3D world centers and axis ranges in transformed coordinates.
2027
2028 For non-linear scales (log, symlog, etc.), centers and ranges are
2029 computed in transformed coordinates to ensure uniform zoom/pan behavior.
2030 """
2031 # Get limits in transformed coordinates for non-linear scale zoom/pan
2032 minx, maxx, miny, maxy, minz, maxz = self._get_scaled_limits()
2033 cx = (maxx + minx)/2
2034 cy = (maxy + miny)/2
2035 cz = (maxz + minz)/2
2036
2037 # Calculate range of axis limits in transformed coordinates
2038 dx = (maxx - minx)
2039 dy = (maxy - miny)
2040 dz = (maxz - minz)
2041 return cx, cy, cz, dx, dy, dz
2042
2043 def set_zlabel(self, zlabel, fontdict=None, labelpad=None, **kwargs):
2044 """

Callers 2

_get_camera_locMethod · 0.95
_scale_axis_limitsMethod · 0.95

Calls 1

_get_scaled_limitsMethod · 0.95

Tested by

no test coverage detected