'Create a 3D contour plot.
Argument    Description
*X*, *Y*,   Data values as numpy.arrays
*Z*
*extend3d*  Whether to extend contour in 3D (default: False)
*stride*    Stride (step size) for extending contour
*zdir*      The direction to use: x, y or z (default)
*offset*    If specified plot a projection of the contour
lines on this position in plane normal to zdir
The positional and other keyword arguments are passed on to
:func:`~matplotlib.axes.Axes.contour`
Returns a :class:`~matplotlib.axes.Axes.contour`'

def contour(self, X, Y, Z, *args, **kwargs):

    extend3d = kwargs.pop(u'extend3d', False)
    stride = kwargs.pop(u'stride', 5)
    zdir = kwargs.pop(u'zdir', u'z')
    offset = kwargs.pop(u'offset', None)
    had_data = self.has_data()
    (jX, jY, jZ) = art3d.rotate_axes(X, Y, Z, zdir)
    cset = super(Axes3D, self).contour(jX, jY, jZ, *args, **kwargs)
    self.add_contour_set(cset, extend3d, stride, zdir, offset)
    self.auto_scale_xyz(X, Y, Z, had_data)
    return cset
