import numpy as npimport matplotlibmatplotlib.use(“TkAgg”)import matplotlib.pyplot as pltdef height(x...np.linspace(-3,3,n)y=np.linspace(-3,3,n)X,Y=np.meshgrid(x,y) #把X,Y传入网格中,X.shape=nn,Y.shape=nnuse plt.contourf...to filling contours#X,Y and value for (X,Y) pointplt.contourf(X,Y,height(X,Y),8,alpha=0.75,cmap=plt.cm.hot