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

Function juggle_axes

lib/mpl_toolkits/mplot3d/art3d.py:1578–1592  ·  view source on GitHub ↗

Reorder coordinates so that 2D *xs*, *ys* can be plotted in the plane orthogonal to *zdir*. *zdir* is normally 'x', 'y' or 'z'. However, if *zdir* starts with a '-' it is interpreted as a compensation for `rotate_axes`.

(xs, ys, zs, zdir)

Source from the content-addressed store, hash-verified

1576
1577
1578def juggle_axes(xs, ys, zs, zdir):
1579 """
1580 Reorder coordinates so that 2D *xs*, *ys* can be plotted in the plane
1581 orthogonal to *zdir*. *zdir* is normally 'x', 'y' or 'z'. However, if
1582 *zdir* starts with a '-' it is interpreted as a compensation for
1583 `rotate_axes`.
1584 """
1585 if zdir == 'x':
1586 return zs, xs, ys
1587 elif zdir == 'y':
1588 return xs, zs, ys
1589 elif zdir[0] == '-':
1590 return rotate_axes(xs, ys, zs, zdir)
1591 else:
1592 return xs, ys, zs
1593
1594
1595def rotate_axes(xs, ys, zs, zdir):

Callers 7

set_3d_propertiesMethod · 0.85
_path_to_3d_segmentFunction · 0.85
collection_2d_to_3dFunction · 0.85
set_3d_propertiesMethod · 0.85
set_3d_propertiesMethod · 0.85
set_3d_propertiesMethod · 0.85

Calls 1

rotate_axesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…