def patch_collection_2d_to_3d(col, zs=0, zdir=u'z', depthshade=True):
 if isinstance(col, PathCollection):
  col.__class__ = Path3DCollection
 elif isinstance(col, PatchCollection):
  col.__class__ = Patch3DCollection
 col._depthshade = depthshade
 col.set_3d_properties(zs, zdir)

def patch_collection_2d_to_3d ( col , zs = 0 , zdir = u'z' , depthshade = True ) : if isinstance ( col , PathCollection ) : col . __class__ = Path3DCollection elif isinstance ( col , PatchCollection ) : col . __class__ = Patch3DCollection col . _depthshade = depthshade col . set_3d_properties ( zs , zdir )
convert a :class:~matplotlib .