Convert a `.PathPatch` to a `.PathPatch3D` object.
(pathpatch, z=0, zdir='z')
| 745 | |
| 746 | |
| 747 | def pathpatch_2d_to_3d(pathpatch, z=0, zdir='z'): |
| 748 | """Convert a `.PathPatch` to a `.PathPatch3D` object.""" |
| 749 | path = pathpatch.get_path() |
| 750 | trans = pathpatch.get_patch_transform() |
| 751 | |
| 752 | mpath = trans.transform_path(path) |
| 753 | pathpatch.__class__ = PathPatch3D |
| 754 | pathpatch.set_3d_properties(mpath, z, zdir) |
| 755 | |
| 756 | |
| 757 | class Patch3DCollection(PatchCollection): |
nothing calls this directly
no test coverage detected
searching dependent graphs…