Matplotlib a multiplatform data visualization library built on NumPy arrays, and designed to work with the broader SciPy stack. Matplotlib has the ability to play well with many operating systems and graphics backends as well. matplotlib.pyplot can also be used for MATLAB-like plotting framework.
Plotting a quadrilateral mesh
pcolormesh() function of the pyplot module is used which is similar to pcolor() function, but pcolor returns PolyCollection whereas pcolormesh returns matplotlib.collections.QuadMesh. pcolormesh is much faster and hence can deal with larger arrays.
Syntax : pcolormesh(cmap = [None | Colormap], alpha = [0<=scalar<=1 | None], edgecolors = [None | color | 'face'], shading = ['gouraud' | 'flat'], norm = [None | Normalize], vimax = [scalar | None], vimin = [scalar | None])
- cmap : It can be None or matplotlib has a number of built-in colormaps accessible via matplotlib.cm.get_cmap
- alpha : It can be None or alpha value between 0 to 1.
- edgecolors :
- If its None, edges will not be visible.
- ‘face’ represents the same color as faces.
- color sequence will set a color.
- shading : It can be either ‘flat’ or ‘gouraud’
- norm : If its None defaults to normalize().
- vimax : It can be either None or the scalar value.
- vimin : It can be either None or the scalar value. ( vimax and vimin are used in conjunction with normalize data)
Example 1 :
Example 2 :
- Python - K list Nested Dictionary Mesh
- PyQtGraph - Getting Plot Item from Plot Window
- Make a violin plot in Python using Matplotlib
- Plot the magnitude spectrum in Python using Matplotlib
- Plot the phase spectrum in Python using Matplotlib
- Plot Mathematical Expressions in Python using Matplotlib
- Plot the power spectral density using Matplotlib - Python
- Contour Plot using Matplotlib - Python
- Box Plot in Python using Matplotlib
- Plot a pie chart in Python using Matplotlib
- Simple Plot in Python using Matplotlib
- Plot 2-D Histogram in Python using Matplotlib
- Tri-Surface Plot in Python using Matplotlib
- Create a pseudocolor plot of an unstructured triangular grid in Python using Matplotlib
- Autocorrelation plot using Matplotlib
- Matplotlib.axes.Axes.plot() in Python
- Matplotlib.pyplot.plot() function in Python
- Bar Plot in Matplotlib
- Quiver Plot in Matplotlib
- Python | Plot different graphs using plotly and cufflinks
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.