'Add a 3D collection object to the plot.
2D collection types are converted to a 3D version by
modifying the object and adding z coordinate information.
Supported are:
- PolyCollection
- LineCollection
- PatchCollection'

def add_collection3d(self, col, zs=0, zdir=u'z'):

    zvals = np.atleast_1d(zs)
    if (len(zvals) > 0):
        zsortval = min(zvals)
    else:
        zsortval = 0
    if (type(col) is mcoll.PolyCollection):
        art3d.poly_collection_2d_to_3d(col, zs=zs, zdir=zdir)
        col.set_sort_zpos(zsortval)
    elif (type(col) is mcoll.LineCollection):
        art3d.line_collection_2d_to_3d(col, zs=zs, zdir=zdir)
        col.set_sort_zpos(zsortval)
    elif (type(col) is mcoll.PatchCollection):
        art3d.patch_collection_2d_to_3d(col, zs=zs, zdir=zdir)
        col.set_sort_zpos(zsortval)
    super(Axes3D, self).add_collection(col)
