The gridplot function displays a regularly gridded data as a patch surface. The input grid data is a m-by-3 matrix as (x, y, z) triplets. The z value is assigned as a color value to the corresponding patch. A random value is assigned to z when the grid data is a m-by-2 matrix.
Using this function, there is no need to interpolate the gridded data, that might be already the result of an interpolation method. While other methods make gridline-registered grids that can be plotted using e.g. Mtlab surf function, this function makes a pixel registered grid and uses the Matlab patch function to display the grid.
Cite As
Mohammad Ali (2024). Grid plot (https://www.mathworks.com/matlabcentral/fileexchange/46010-grid-plot), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Surfaces, Volumes, and Polygons > Surface and Mesh Plots >
- MATLAB > Mathematics > Interpolation > Interpolating Gridded Data >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.