Sharedsupport / 2015-05-12-204845.ipynbOpen in CoCalc
Examples for support purposes...
%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()