def pcolor(self, *args, **kwargs):
if not self._hold: self.cla()<EOL>alpha = kwargs.pop('<STR_LIT>', <NUM_LIT:1.0>)<EOL>norm = kwargs.pop('<STR_LIT>', None)<EOL>cmap = kwargs.pop('<STR_LIT>', None)<EOL>vmin = kwargs.pop('<STR_LIT>', None)<EOL>vmax = kwargs.pop('<STR_LIT>', None)<EOL>shading = kwargs.pop('<STR_LIT>', '<STR_LIT>')<EOL>X, Y, C = self._pcolorargs('<STR_LIT>', *args)<EOL>Ny, Nx = X.shape<EOL>C = ma.asarray(C)<EOL>X = ma.asarray(X)<EOL>Y = ma.asarray(Y)<EOL>mask = ma.getmaskarray(X)+ma.getmaskarray(Y)<EOL>xymask = mask[<NUM_LIT:0>:-<NUM_LIT:1>,<NUM_LIT:0>:-<NUM_LIT:1>]+mask[<NUM_LIT:1>:,<NUM_LIT:1>:]+mask[<NUM_LIT:0>:-<NUM_LIT:1>,<NUM_LIT:1>:]+mask[<NUM_LIT:1>:,<NUM_LIT:0>:-<NUM_LIT:1>]<EOL>mask = ma.getmaskarray(C)[<NUM_LIT:0>:Ny-<NUM_LIT:1>,<NUM_LIT:0>:Nx-<NUM_LIT:1>]+xymask<EOL>newaxis = np.newaxis<EOL>compress = np.compress<EOL>ravelmask = (mask==<NUM_LIT:0>).ravel()<EOL>X1 = compress(ravelmask, ma.filled(X[<NUM_LIT:0>:-<NUM_LIT:1>,<NUM_LIT:0>:-<NUM_LIT:1>]).ravel())<EOL>Y1 = compress(ravelmask, ma.filled(Y[<NUM_LIT:0>:-<NUM_LIT:1>,<NUM_LIT:0>:-<NUM_LIT:1>]).ravel())<EOL>X2 = compress(ravelmask, ma.filled(X[<NUM_LIT:1>:,<NUM_LIT:0>:-<NUM_LIT:1>]).ravel())<EOL>Y2 = compress(ravelmask, ma.filled(Y[<NUM_LIT:1>:,<NUM_LIT:0>:-<NUM_LIT:1>]).ravel())<EOL>X3 = compress(ravelmask, ma.filled(X[<NUM_LIT:1>:,<NUM_LIT:1>:]).ravel())<EOL>Y3 = compress(ravelmask, ma.filled(Y[<NUM_LIT:1>:,<NUM_LIT:1>:]).ravel())<EOL>X4 = compress(ravelmask, ma.filled(X[<NUM_LIT:0>:-<NUM_LIT:1>,<NUM_LIT:1>:]).ravel())<EOL>Y4 = compress(ravelmask, ma.filled(Y[<NUM_LIT:0>:-<NUM_LIT:1>,<NUM_LIT:1>:]).ravel())<EOL>npoly = len(X1)<EOL>xy = np.concatenate((X1[:,newaxis], Y1[:,newaxis],<EOL>X2[:,newaxis], Y2[:,newaxis],<EOL>X3[:,newaxis], Y3[:,newaxis],<EOL>X4[:,newaxis], Y4[:,newaxis],<EOL>X1[:,newaxis], Y1[:,newaxis]),<EOL>axis=<NUM_LIT:1>)<EOL>verts = xy.reshape((npoly, <NUM_LIT:5>, <NUM_LIT:2>))<EOL>C = compress(ravelmask, ma.filled(C[<NUM_LIT:0>:Ny-<NUM_LIT:1>,<NUM_LIT:0>:Nx-<NUM_LIT:1>]).ravel())<EOL>if shading == '<STR_LIT>':<EOL><INDENT>edgecolors = (<NUM_LIT:0>,<NUM_LIT:0>,<NUM_LIT:0>,<NUM_LIT:1>),<EOL>linewidths = (<NUM_LIT>,)<EOL><DEDENT>else:<EOL><INDENT>edgecolors = '<STR_LIT>'<EOL>linewidths = (<NUM_LIT:1.0>,)<EOL><DEDENT>kwargs.setdefault('<STR_LIT>', edgecolors)<EOL>kwargs.setdefault('<STR_LIT>', (<NUM_LIT:0>,))<EOL>kwargs.setdefault('<STR_LIT>', linewidths)<EOL>collection = mcoll.PolyCollection(verts, **kwargs)<EOL>collection.set_alpha(alpha)<EOL>collection.set_array(C)<EOL>if norm is not None: assert(isinstance(norm, mcolors.Normalize))<EOL>if cmap is not None: assert(isinstance(cmap, mcolors.Colormap))<EOL>collection.set_cmap(cmap)<EOL>collection.set_norm(norm)<EOL>if vmin is not None or vmax is not None:<EOL><INDENT>collection.set_clim(vmin, vmax)<EOL><DEDENT>else:<EOL><INDENT>collection.autoscale_None()<EOL><DEDENT>self.grid(False)<EOL>x = X.compressed()<EOL>y = Y.compressed()<EOL>minx = np.amin(x)<EOL>maxx = np.amax(x)<EOL>miny = np.amin(y)<EOL>maxy = np.amax(y)<EOL>corners = (minx, miny), (maxx, maxy)<EOL>self.update_datalim( corners)<EOL>self.autoscale_view()<EOL>self.add_collection(collection)<EOL>return collection<EOL>
call signatures::

  pcolor(C, **kwargs)
  pcolor(X, Y, C, **kwargs)

Create a pseudocolor plot of a 2-D array.

*C* is the array of color values.

*X* and *Y*, if given, specify the (*x*, *y*) coordinates of
the colored quadrilaterals; the quadrilateral for C[i,j] has
corners at::

  (X[i,   j],   Y[i,   j]),
  (X[i,   j+1], Y[i,   j+1]),
  (X[i+1, j],   Y[i+1, j]),
  (X[i+1, j+1], Y[i+1, j+1]).

Ideally the dimensions of *X* and *Y* should be one greater
than those of *C*; if the dimensions are the same, then the
last row and column of *C* will be ignored.

Note that the the column index corresponds to the
*x*-coordinate, and the row index corresponds to *y*; for
details, see the :ref:`Grid Orientation
<axes-pcolor-grid-orientation>` section below.

If either or both of *X* and *Y* are 1-D arrays or column vectors,
they will be expanded as needed into the appropriate 2-D arrays,
making a rectangular grid.

*X*, *Y* and *C* may be masked arrays.  If either C[i, j], or one
of the vertices surrounding C[i,j] (*X* or *Y* at [i, j], [i+1, j],
[i, j+1],[i+1, j+1]) is masked, nothing is plotted.

Keyword arguments:

  *cmap*: [ None | Colormap ]
    A :class:`matplotlib.cm.Colormap` instance. If *None*, use
    rc settings.

  norm: [ None | Normalize ]
    An :class:`matplotlib.colors.Normalize` instance is used
    to scale luminance data to 0,1. If *None*, defaults to
    :func:`normalize`.

  *vmin*/*vmax*: [ None | scalar ]
    *vmin* and *vmax* are used in conjunction with *norm* to
    normalize luminance data.  If either are *None*, the min
    and max of the color array *C* is used.  If you pass a
    *norm* instance, *vmin* and *vmax* will be ignored.

  *shading*: [ 'flat' | 'faceted' ]
    If 'faceted', a black grid is drawn around each rectangle; if
    'flat', edges are not drawn. Default is 'flat', contrary to
    Matlab(TM).

    This kwarg is deprecated; please use 'edgecolors' instead:
      * shading='flat' -- edgecolors='None'
      * shading='faceted  -- edgecolors='k'

  *edgecolors*: [ None | 'None' | color | color sequence]
    If *None*, the rc setting is used by default.

    If 'None', edges will not be visible.

    An mpl color or sequence of colors will set the edge color

  *alpha*: 0 <= scalar <= 1
    the alpha blending value

Return value is a :class:`matplotlib.collection.Collection`
instance.

.. _axes-pcolor-grid-orientation:

The grid orientation follows the Matlab(TM) convention: an
array *C* with shape (*nrows*, *ncolumns*) is plotted with
the column number as *X* and the row number as *Y*, increasing
up; hence it is plotted the way the array would be printed,
except that the *Y* axis is reversed.  That is, *C* is taken
as *C*(*y*, *x*).

Similarly for :func:`~matplotlib.pyplot.meshgrid`::

  x = np.arange(5)
  y = np.arange(3)
  X, Y = meshgrid(x,y)

is equivalent to:

  X = array([[0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4]])

  Y = array([[0, 0, 0, 0, 0],
             [1, 1, 1, 1, 1],
             [2, 2, 2, 2, 2]])

so if you have::

  C = rand( len(x), len(y))

then you need::

  pcolor(X, Y, C.T)

or::

  pcolor(C.T)

Matlab :func:`pcolor` always discards the last row and column
of *C*, but matplotlib displays the last row and column if *X* and
*Y* are not specified, or if *X* and *Y* have one more row and
column than *C*.

kwargs can be used to control the
:class:`~matplotlib.collection.PolyCollection` properties:

%(PolyCollection)s