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

Method do_3d_projection

lib/mpl_toolkits/mplot3d/art3d.py:453–468  ·  view source on GitHub ↗

Project the points according to renderer matrix.

(self)

Source from the content-addressed store, hash-verified

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
471def collection_2d_to_3d(col, zs=0, zdir='z', axlim_clip=False):

Callers

nothing calls this directly

Calls 3

_scale_invalid_maskFunction · 0.85
_viewlim_maskFunction · 0.85
minMethod · 0.80

Tested by

no test coverage detected