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

Method _equal_aspect_axis_indices

lib/mpl_toolkits/mplot3d/axes3d.py:376–395  ·  view source on GitHub ↗

Get the indices for which of the x, y, z axes are constrained to have equal aspect ratios. Parameters ---------- aspect : {'auto', 'equal', 'equalxy', 'equalxz', 'equalyz'} See descriptions in docstring for `.set_aspect()`.

(self, aspect)

Source from the content-addressed store, hash-verified

374 self.set_box_aspect(box_aspect)
375
376 def _equal_aspect_axis_indices(self, aspect):
377 """
378 Get the indices for which of the x, y, z axes are constrained to have
379 equal aspect ratios.
380
381 Parameters
382 ----------
383 aspect : {'auto', 'equal', 'equalxy', 'equalxz', 'equalyz'}
384 See descriptions in docstring for `.set_aspect()`.
385 """
386 ax_indices = [] # aspect == 'auto'
387 if aspect == 'equal':
388 ax_indices = [0, 1, 2]
389 elif aspect == 'equalxy':
390 ax_indices = [0, 1]
391 elif aspect == 'equalxz':
392 ax_indices = [0, 2]
393 elif aspect == 'equalyz':
394 ax_indices = [1, 2]
395 return ax_indices
396
397 def set_box_aspect(self, aspect, *, zoom=1):
398 """

Callers 2

set_aspectMethod · 0.95
_zoom_data_limitsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected