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)
| 1576 | |
| 1577 | |
| 1578 | def 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 | |
| 1595 | def rotate_axes(xs, ys, zs, zdir): |
no test coverage detected
searching dependent graphs…