Triangulations are used to plot geographical maps, which help with understanding the relative distance between various points. The longitude and latitude values are used as x, y coordinates to plot the points. To draw a triangle, three points are required; these are specified with the corresponding indices of the points on the plot. For a given set of coordinates, Matplotlib can compute triangles automatically and plot the graph, or optionally we can also provide triangles as an argument.
Triangulations
Getting ready
Import the required libraries. We will introduce the tri package for triangulations:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.tri as tri