frommpl_toolkitsimportmplot3dimportnumpyasnpimportmatplotlib.pyplotaspltfrommatplotlibimportcmimportmathx=[iforiinrange(0,200,100)]y=[iforiinrange(0,200,100)]X,Y=np.meshgrid(x,y)Z=[]foriinx:t=[]forjiny:t.append(math.cos(math.sqrt(i*2+j*2)))Z.append(t)fig=plt.figure()ax=plt.axes(projection='3d')ax.contour3D(X,Y,Z,50,cmap=cm.cool)ax.set_xlabel('a')ax.set_ylabel('b')ax.set_zlabel('c')ax.set_title('3D contour for cosine')plt.show()