Create a pseudocolor plot with a non-regular rectangular grid. Call signature:: pcolormesh([X, Y,] C, /, **kwargs) *X* and *Y* can be used to specify the corners of the quadrilaterals. The arguments *X*, *Y*, *C* are positional-only. .. hint:
(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
vmax=None, colorizer=None, shading=None, antialiased=False,
**kwargs)
| 6701 | @_preprocess_data() |
| 6702 | @_docstring.interpd |
| 6703 | def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, |
| 6704 | vmax=None, colorizer=None, shading=None, antialiased=False, |
| 6705 | **kwargs): |
| 6706 | """ |
| 6707 | Create a pseudocolor plot with a non-regular rectangular grid. |
| 6708 | |
| 6709 | Call signature:: |
| 6710 | |
| 6711 | pcolormesh([X, Y,] C, /, **kwargs) |
| 6712 | |
| 6713 | *X* and *Y* can be used to specify the corners of the quadrilaterals. |
| 6714 | |
| 6715 | The arguments *X*, *Y*, *C* are positional-only. |
| 6716 | |
| 6717 | .. hint:: |
| 6718 | |
| 6719 | `~.Axes.pcolormesh` is similar to `~.Axes.pcolor`. It is much faster |
| 6720 | and preferred in most cases. For a detailed discussion on the |
| 6721 | differences see :ref:`Differences between pcolor() and pcolormesh() |
| 6722 | <differences-pcolor-pcolormesh>`. |
| 6723 | |
| 6724 | Parameters |
| 6725 | ---------- |
| 6726 | C : array-like |
| 6727 | The mesh data. Supported array shapes are: |
| 6728 | |
| 6729 | - (M, N) or M*N: a mesh with scalar data. The values are mapped to |
| 6730 | colors using normalization and a colormap. See parameters *norm*, |
| 6731 | *cmap*, *vmin*, *vmax*. |
| 6732 | - (M, N, 3): an image with RGB values (0-1 float or 0-255 int). |
| 6733 | - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int), |
| 6734 | i.e. including transparency. |
| 6735 | |
| 6736 | The first two dimensions (M, N) define the rows and columns of |
| 6737 | the mesh data. |
| 6738 | |
| 6739 | X, Y : array-like, optional |
| 6740 | The coordinates of the corners of quadrilaterals of a pcolormesh:: |
| 6741 | |
| 6742 | (X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1]) |
| 6743 | ●╶───╴● |
| 6744 | │ │ |
| 6745 | ●╶───╴● |
| 6746 | (X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1]) |
| 6747 | |
| 6748 | Note that the column index corresponds to the x-coordinate, and |
| 6749 | the row index corresponds to y. For details, see the |
| 6750 | :ref:`Notes <axes-pcolormesh-grid-orientation>` section below. |
| 6751 | |
| 6752 | If ``shading='flat'`` the dimensions of *X* and *Y* should be one |
| 6753 | greater than those of *C*, otherwise a TypeError is raised. The |
| 6754 | quadrilateral is colored due to the value at ``C[i, j]``. |
| 6755 | |
| 6756 | If ``shading='nearest'`` or ``'gouraud'``, the dimensions of *X* |
| 6757 | and *Y* should be the same as those of *C* (if not, a TypeError |
| 6758 | will be raised). For ``'nearest'`` the color ``C[i, j]`` is |
| 6759 | centered on ``(X[i, j], Y[i, j])``. For ``'gouraud'``, a smooth |
| 6760 | interpolation is carried out between the quadrilateral corners. |