Tri-Surface Plot in Python using Matplotlib
A Tri-Surface Plot is a type of surface plot, created by triangulation of compact surfaces of finite number of triangles which cover the whole surface in a manner that each and every point on the surface is in triangle. The intersection of any two triangles results in void or a common edge or vertex. This type of plot is created where the evenly sampled grids are restrictive and inconvenient to plot. Generally Tri-Surface plots are created by calling ax.plot_trisurf() function of matplotlib library. Some of the attributes of the function are listed below:
|X, Y, Z||dataset as 1D array to be plotted|
|colors||color of the surface patches|
|cmap||color map to set the color of surface patches|
|norm||parameter to normalize map values of colors|
|vmin||minimum value of map|
|vamx||maximum value of map|
|shade||attribute to shade the facecolors|
Example 1: Let’s create a basic Tri-Surface plot using the ax.plot_trisurf() function.
Example 2 : For better understanding Let’s take another example.