Closed
Description
As reported to matplotlib.users, passing duplicate points to tricontour can cause it to hang. Here is a minimal example:
import matplotlib.pyplot as plt
import matplotlib.tri as tri
import numpy as np
from numpy.random import uniform, seed
seed(0)
npts = 7
x = uniform(-2,2,npts)
y = uniform(-2,2,npts)
z = x*np.exp(-x**2-y**2)
y[1:2] = y[0] # Duplicate points make tricontour hang!
x[1:2] = x[0]
triang = tri.Triangulation(x, y)
plt.triplot(triang)
plt.tricontour(triang, z, 15, linewidths=0.5, colors='k')
plt.show()
Metadata
Metadata
Assignees
Labels
No labels