matplotlib / 3.4.3 / _as_gen / mpl_toolkits.mplot3d.art3d.get_dir_vector.html /

mpl_toolkits.mplot3d.art3d.get_dir_vector

mpl_toolkits.mplot3d.art3d. get_dir_vector ( zdir ) [source]

Return a direction vector.

Parameters:
zdir {'x', 'y', 'z', None, 3-tuple}

The direction. Possible values are:

  • 'x': equivalent to (1, 0, 0)
  • 'y': equivalent to (0, 1, 0)
  • 'z': equivalent to (0, 0, 1)
  • None: equivalent to (0, 0, 0)
  • an iterable (x, y, z) is converted to a NumPy array, if not already
Returns:
x, y, z array-like

The direction vector.

Examples using mpl_toolkits.mplot3d.art3d.get_dir_vector

© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.4.3/api/_as_gen/mpl_toolkits.mplot3d.art3d.get_dir_vector.html