Source code has been slightly modified into fully object-oriented matplotlib interface. It now uses the "inferno" colormap, instead of "jet" which produces perceptual glitches.
Source code
Bu, Logosu: Matplotlib – comprehensive library for creating static, animated, and interactive visualizations in Python
This media was created with Matplotlib (comprehensive library for creating static, animated, and interactive visualizations in Python) and Python (programlama dili) and NumPy (numerical programming package for the Python programming language)
Here is a listing of the source used to create this file.
The matplotlib (mpl) version is 1.5.3, with Python 2.7 and numpy 1.10
############ Code for the figure##########importmatplotlib.pyplotaspltimportnumpyasnpfrommpl_toolkits.mplot3dimportAxes3Dfrommatplotlib.cmimportinfernoascolormapfrommatplotlib.colorsimportLogNormfig=plt.figure()fig.clf()ax=Axes3D(fig,azim=-128.0,elev=43.0)s=0.05x=np.arange(-2.0,2.0+s,s)y=np.arange(-1.0,3.0+s,s)X,Y=np.meshgrid(x,y)Z=(1.0-X)**2+100.0*(Y-X*X)**2# Without using `` linewidth=0, edgecolor='none' '', the code may produce a# graph with wide black edges, which will make the surface look much darker.ax.plot_surface(X,Y,Z,rstride=1,cstride=1,norm=LogNorm(),cmap=colormap,linewidth=0,edgecolor='none')ax.set_xlim([-2,2])ax.set_ylim([-1,3])ax.set_zlim([0,2500])ax.set_xlabel("x")ax.set_ylabel("y")fig.savefig("Rosenbrock function.svg")plt.show()##########
Lisanslama
Ben, bu işin telif sahibi, burada işi aşağıdaki lisans altında yayımlıyorum:
atıf – Esere yazar veya lisans sahibi tarafından belirtilen (ancak sizi ya da eseri kullanımınızı desteklediklerini ileri sürmeyecek bir) şekilde atıfta bulunmalısınız.
benzer paylaşım – Maddeyi yeniden düzenler, dönüştürür veya inşa ederseniz, katkılarınızı özgünüyle aynı veya uyumlu lisans altında dağıtmanız gerekir.
Bu dosyada, muhtemelen fotoğraf makinesi ya da tarayıcı tarafından eklenmiş ek bilgiler mevcuttur. Eğer dosyada sonradan değişiklik yapıldıysa, bazı bilgiler yeni değişikliğe göre eski kalmış olabilir.