'Plot a 3D wireframe.
The `rstride` and `cstride` kwargs set the stride used to
sample the input data to generate the graph. If either is 0
the input data in not sampled along this direction producing a
3D line plot rather than a wireframe plot. The stride arguments
are only used by default if in the \'classic\' mode. They are
now superseded by `rcount` and `ccount`. Will raise ValueError
if both stride and count are used.
`       The `rcount` and `ccount` kwargs supersedes `rstride` and
`cstride` for default sampling method for wireframe plotting.
These arguments will determine at most how many evenly spaced
samples will be taken from the input data to generate the graph.
This is the default sampling method unless using the \'classic\'
style. Will raise ValueError if both stride and count are
specified. If either is zero, then the input data is not sampled
along this direction, producing a 3D line plot rather than a
wireframe plot.
Added in v2.0.0.
Argument    Description
*X*, *Y*,   Data values as 2D arrays
*Z*
*rstride*   Array row stride (step size), defaults to 1
*cstride*   Array column stride (step size), defaults to 1
*rcount*    Use at most this many rows, defaults to 50
*ccount*    Use at most this many columns, defaults to 50
Keyword arguments are passed on to
:class:`~matplotlib.collections.LineCollection`.
Returns a :class:`~mpl_toolkits.mplot3d.art3d.Line3DCollection`'

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

    had_data = self.has_data()
    if (Z.ndim != 2):
        raise ValueError(u'Argument    Z    must    be    2-dimensional.')
    (X, Y, Z) = np.broadcast_arrays(X, Y, Z)
    (rows, cols) = Z.shape
    has_stride = ((u'rstride' in kwargs) or (u'cstride' in kwargs))
    has_count = ((u'rcount' in kwargs) or (u'ccount' in kwargs))
    if (has_stride and has_count):
        raise ValueError(u'Cannot    specify    both    stride    and    count    arguments')
    rstride = kwargs.pop(u'rstride', 1)
    cstride = kwargs.pop(u'cstride', 1)
    rcount = kwargs.pop(u'rcount', 50)
    ccount = kwargs.pop(u'ccount', 50)
    if rcParams[u'_internal.classic_mode']:
        if has_count:
            rstride = (int(np.ceil((rows / rcount))) if rcount else 0)
            cstride = (int(np.ceil((cols / ccount))) if ccount else 0)
    elif (not has_stride):
        rstride = (int(np.ceil((rows / rcount))) if rcount else 0)
        cstride = (int(np.ceil((cols / ccount))) if ccount else 0)
    (tX, tY, tZ) = (np.transpose(X), np.transpose(Y), np.transpose(Z))
    if rstride:
        rii = list(xrange(0, rows, rstride))
        if ((rows > 0) and (rii[(-1)] != (rows - 1))):
            rii += [(rows - 1)]
    else:
        rii = []
    if cstride:
        cii = list(xrange(0, cols, cstride))
        if ((cols > 0) and (cii[(-1)] != (cols - 1))):
            cii += [(cols - 1)]
    else:
        cii = []
    if ((rstride == 0) and (cstride == 0)):
        raise ValueError(u'Either    rstride    or    cstride    must    be    non    zero')
    if (Z.size == 0):
        rii = []
        cii = []
    xlines = [X[i] for i in rii]
    ylines = [Y[i] for i in rii]
    zlines = [Z[i] for i in rii]
    txlines = [tX[i] for i in cii]
    tylines = [tY[i] for i in cii]
    tzlines = [tZ[i] for i in cii]
    lines = [list(zip(xl, yl, zl)) for (xl, yl, zl) in zip(xlines, ylines, zlines)]
    lines += [list(zip(xl, yl, zl)) for (xl, yl, zl) in zip(txlines, tylines, tzlines)]
    linec = art3d.Line3DCollection(lines, *args, **kwargs)
    self.add_collection(linec)
    self.auto_scale_xyz(X, Y, Z, had_data)
    return linec
