Open in CoCalc with one click!
In [3]:
%matplotlib inline import matplotlib.pyplot as pyplot import matplotlib.tri as tri import numpy node = numpy.asarray([[0,0],[1,0],[1,1],[0,1]]) x = node[:,0] y = node[:,1] triangles = numpy.asarray([[1,2,0],[3,0,2]]) pyplot.figure() pyplot.gca().set_aspect('equal') pyplot.triplot(x, y, triangles, 'go-') pyplot.title('triplot of user-specified triangulation') pyplot.xlabel('Longitude (degrees)') pyplot.ylabel('Latitude (degrees)') pyplot.show()
In [ ]: