usr bin python import matplotlib pyplot as plt import numpy as np impo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python
import matplotlib.pyplot as plt
import numpy as np
import scipy.interpolate
file_path = "C:/Users/Alexey/Documents/Visual Studio 2013/Projects/Kursovaya_v2/Kursovaya_v2/temperature_1min.dat"
N = 1000
x, y, z = np.genfromtxt(file_path, unpack=True)
xi = np.linspace(x.min(), x.max(), N)
yi = np.linspace(y.min(), y.max(), N)
zi = scipy.interpolate.griddata((x, y), z, (xi[None, :], yi[:, None]), method='cubic')
plt.figure()
cp = plt.contourf(xi, yi, zi)
#plt.clabel(cp, inline=1, fmt='%1.0f', fontsize=10)
plt.colorbar()
plt.show()