Skip to content

Instantly share code, notes, and snippets.

@mrklein
Last active August 29, 2015 13:56
Show Gist options
  • Save mrklein/9189590 to your computer and use it in GitHub Desktop.
Save mrklein/9189590 to your computer and use it in GitHub Desktop.
from scipy.spatial import Delaunay
from matplotlib.tri import Triangulation
data = N.loadtxt(filename)
x = 100*data[:, xidx]
y = 100*data[:, yidx]
pts = N.column_stack((x, y))
tri = Delaunay(pts)
mtri = Triangulation(x, y, tri.simplices.copy())
fl = data[:, flidx]
asp = 4.5/(xlim[1] - xlim[0])
P.figure(figsize=(8, 8*asp))
P.clf()
P.tricontour(mtri, fl, [0.5], colors='black')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment