Draw a unstructured triangular grid as lines or markers in Python using Matplotlib
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
Unstructured Triangular Grid
An unstructured grid can be defined as the part of the Euclidean plane or diagram that can be fit together in a pattern with no spaces in between two shapes. Unstructured grid can be triangle or tetrahedra in an irregular pattern. Unstructured Triangular Grid can be drawn from an irregularly shaped polygon using the Ruppert’s algorithm.
Here the task is to draw a unstructured triangular grid as lines and/or markers in Python using Matplotlib. In order to do this task, you can use the triplot() function and we require some modules from matplotlib and numpy library.
Example 1: Creating and plotting unstructured triangular grids.
Example 2: Using the TriFinder object to highlight the unstructured triangular grid.
Example 3: Example showing the plot the triangulation.