Return a new `Path` with vertices and codes cleaned according to the parameters. See Also -------- Path.iter_segments : for details of the keyword arguments.
(self, transform=None, remove_nans=False, clip=None,
*, simplify=False, curves=False,
stroke_width=1.0, snap=False, sketch=None)
| 487 | self.vertices[sl], self.codes[sl], self) |
| 488 | |
| 489 | def cleaned(self, transform=None, remove_nans=False, clip=None, |
| 490 | *, simplify=False, curves=False, |
| 491 | stroke_width=1.0, snap=False, sketch=None): |
| 492 | """ |
| 493 | Return a new `Path` with vertices and codes cleaned according to the |
| 494 | parameters. |
| 495 | |
| 496 | See Also |
| 497 | -------- |
| 498 | Path.iter_segments : for details of the keyword arguments. |
| 499 | """ |
| 500 | vertices, codes = _path.cleanup_path( |
| 501 | self, transform, remove_nans, clip, snap, stroke_width, simplify, |
| 502 | curves, sketch) |
| 503 | pth = Path._fast_from_codes_and_verts(vertices, codes, self) |
| 504 | if not simplify: |
| 505 | pth._should_simplify = False |
| 506 | return pth |
| 507 | |
| 508 | def transformed(self, transform): |
| 509 | """ |