VOOZH about

URL: https://www.geeksforgeeks.org/python/tri-surface-plot-in-python-using-matplotlib/

⇱ Tri-Surface Plot in Python using Matplotlib - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Tri-Surface Plot in Python using Matplotlib

Last Updated : 12 Jul, 2025

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:

AttributeParameter
X, Y, Zdataset as 1D array to be plotted
colorscolor of the surface patches
cmapcolor map to set the color of surface patches
normparameter to normalize map values of colors
vminminimum value of map
vamxmaximum value of map
shadeattribute to shade the facecolors

Example 1: Let's create a basic Tri-Surface plot using the ax.plot_trisurf() function. 

Output : 

👁 Tri-Surface Plot in Python using Matplotlib

Example 2 : For better understanding Let's take another example. 

Comment