跳至內容

File:Mpl example Rosenbrock function.svg

頁面內容不支援其他語言。
這個檔案來自維基共享資源
維基百科,自由的百科全書
    原始檔案 (SVG 檔案,表面大小:720 × 540 像素,檔案大小:1.21 MB)


    摘要

    描述
    English: Rosenbrock function over ℝ2, plotted with matplotlib (and with "inferno", a perceptually monotonic colormap).
    日期
    來源 自己的作品
    作者 Adrien F. Vincent
    SVG開發
    InfoField
     本SVG檔案的原始碼通過W3C驗證。
     本向量圖形使用Matplotlib創作。

    Rationale: this work aims at providing an up-to-date version of the similar work https://commons.wikimedia.org/wiki/File:Rosenbrock_function.svg , done by Morn the Gorn.

    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

    The logo of Matplotlib – Python程式語言的一個繪圖函式庫
    The logo of Matplotlib – Python程式語言的一個繪圖函式庫
    This media was created with Matplotlib (Python程式語言的一個繪圖函式庫)以及​Python (通用高階程式語言)以及​NumPy (Python程式語言的數值程式語言軟件包)
    Here is a listing of the source used to create this file.

    Deutsch ∙ македонски ∙ English ∙ +/−

    The matplotlib (mpl) version is 1.5.3, with Python 2.7 and numpy 1.10

    ##########
    ## Code for the figure
    ##########
    import matplotlib.pyplot as plt
    import numpy as np
    
    from mpl_toolkits.mplot3d import Axes3D
    from matplotlib.cm import inferno as colormap
    from matplotlib.colors import LogNorm
    
    fig = plt.figure()
    fig.clf()
    ax = Axes3D(fig, azim=-128.0, elev=43.0)
    
    s = 0.05
    x = 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()
    ##########
    

    授權條款

    我,本作品的著作權持有者,決定用以下授權條款發佈本作品:
    w:zh:共享創意
    姓名標示 相同方式分享
    您可以自由:
    • 分享 – 複製、發佈和傳播本作品
    • 重新修改 – 創作演繹作品
    惟需遵照下列條件:
    • 姓名標示 – 您必須指名出正確的製作者,和提供授權條款的連結,以及表示是否有對內容上做出變更。您可以用任何合理的方式來行動,但不得以任何方式表明授權條款是對您許可或是由您所使用。
    • 相同方式分享 – 若要根據本素材進行再混合、轉換或創作,則必須以與原作相同或相容的授權來發布您的作品。

    說明

    添加單行說明來描述出檔案所代表的內容

    在此檔案描寫的項目

    描繪內容

    版權狀態 中文 (香港) (已轉換拼寫)

    有版權 中文 (香港) (已轉換拼寫)

    檔案來源 中文 (臺灣) (已轉換拼寫)

    上傳者的原創作品 繁體中文 (已轉換拼寫)

    檔案歷史

    點選某个日期/時間檢視對應時刻的檔案。

    日期/時間縮⁠圖大小用戶備⁠註
    目前2016年9月27日 (二) 09:52於 2016年9月27日 (二) 09:52 版本的縮圖720 × 540​(1.21 MB)Adrien F. VincentUser created page with UploadWizard

    下列頁面有用到此檔案:

    全域檔案使用狀況

    以下其他wiki使用了這個檔案:

    詮釋資料