Get the unit vectors for the viewing axes in data coordinates. `u` is towards the right of the screen `v` is towards the top of the screen `w` is out of the screen
(self, eye)
| 1887 | minz + dz, maxz + dz) |
| 1888 | |
| 1889 | def _calc_view_axes(self, eye): |
| 1890 | """ |
| 1891 | Get the unit vectors for the viewing axes in data coordinates. |
| 1892 | `u` is towards the right of the screen |
| 1893 | `v` is towards the top of the screen |
| 1894 | `w` is out of the screen |
| 1895 | """ |
| 1896 | elev_rad = np.deg2rad(art3d._norm_angle(self.elev)) |
| 1897 | roll_rad = np.deg2rad(art3d._norm_angle(self.roll)) |
| 1898 | |
| 1899 | # Look into the middle of the world coordinates |
| 1900 | R = 0.5 * self._roll_to_vertical(self._box_aspect) |
| 1901 | |
| 1902 | # Define which axis should be vertical. A negative value |
| 1903 | # indicates the plot is upside down and therefore the values |
| 1904 | # have been reversed: |
| 1905 | V = np.zeros(3) |
| 1906 | V[self._vertical_axis] = -1 if abs(elev_rad) > np.pi/2 else 1 |
| 1907 | |
| 1908 | u, v, w = proj3d._view_axes(eye, R, V, roll_rad) |
| 1909 | return u, v, w |
| 1910 | |
| 1911 | def _set_view_from_bbox(self, bbox, direction='in', |
| 1912 | mode=None, twinx=False, twiny=False): |
no test coverage detected