I want to make a beautiful contour map using my data attached and want to write A B C D E F G H on the map itself.
dt x y z
A 31.53 77.95 0.112
B 31.40 78.35 0.032
C 31.66 78.03 -0.001
D 31.48 77.75 -0.092
E 32.28 78.45 -0.113
F 31.99 76.42 -0.184
G 31.64 77.34 -0.016
H 32.50 75.62 -0.121
My script is here :
import matplotlib.pyplot as plt
import numpy as np
data=np.loadtxt("data.txt",dtype='str')
plt.tricontour(data[:,2],data[:,1],data[:,3], colors='black');
#plt.tricontour(x,y,z)
plt.show()
I am getting the error
self.triangles, self._neighbors = _qhull.delaunay(x, y)
ValueError: x and y must be 1D arrays of the same length
please suggest a better solution for this.Thanks in advance.
i need plots like https://jakevdp.github.io/PythonDataScienceHandbook/04.04-density-and-contour-plots.html

