Project the points according to renderer matrix.
(self)
| 451 | """A collection of 3D paths.""" |
| 452 | |
| 453 | def do_3d_projection(self): |
| 454 | """Project the points according to renderer matrix.""" |
| 455 | vs_list = [vs for vs, _ in self._3dverts_codes] |
| 456 | masks = [_scale_invalid_mask(*vs.T, self.axes) for vs in vs_list] |
| 457 | if self._axlim_clip: |
| 458 | masks = [m | _viewlim_mask(*vs.T, self.axes) |
| 459 | for m, vs in zip(masks, vs_list)] |
| 460 | vs_list = [np.ma.array(vs, mask=np.broadcast_to(m, vs.shape)) |
| 461 | if np.any(m) else vs |
| 462 | for vs, m in zip(vs_list, masks)] |
| 463 | xyzs_list = [proj3d._scale_proj_transform( |
| 464 | vs[:, 0], vs[:, 1], vs[:, 2], self.axes) for vs in vs_list] |
| 465 | self._paths = [mpath.Path(np.ma.column_stack([xs, ys]), cs) |
| 466 | for (xs, ys, _), (_, cs) in zip(xyzs_list, self._3dverts_codes)] |
| 467 | zs = np.concatenate([zs for _, _, zs in xyzs_list]) |
| 468 | return zs.min() if len(zs) else 1e9 |
| 469 | |
| 470 | |
| 471 | def collection_2d_to_3d(col, zs=0, zdir='z', axlim_clip=False): |
nothing calls this directly
no test coverage detected