I 3 1-Dのndarrays有する:X、Y、Z値のないpcolormesh?
、次のコード:
import numpy as np
import matplotlib.pyplot as plt
import scipy.interpolate as spinterp
## define data
npoints = 50
xreg = np.linspace(x.min(),x.max(),npoints)
yreg = np.linspace(y.min(),y.max(),npoints)
X,Y = np.meshgrid(xreg,yreg)
Z = spinterp.griddata(np.vstack((x,y)).T,z,(X,Y),
method='linear').reshape(X.shape)
## plot
plt.close()
ax = plt.axes()
col = ax.pcolormesh(X,Y,Z.T)
plt.draw()
マイプロットはブランク出てくる、私は方法は= '線形' 補間ので、それは疑いをナンと出てくる。私はマスクされた配列に変換しようとしましたが、役に立つことはありません - プロットはまだ空白です。私が間違っていることを教えてくれますか?ありがとう。