python matplotlib包映像色彩配置

來源:互聯網
上載者:User

標籤:hot   less   upper   顏色   origin   技術分享   ati   rest   plot   

可選的色彩配置:

常用的幾個:

顏色圖譜 描述
autumn 紅-橙-黃
bone 黑-白,x線
cool 青-洋紅
copper 黑-銅
flag 紅-白-藍-黑
gray 黑-白
hot 黑-紅-黃-白
hsv hsv色彩空間, 紅-黃-綠-青-藍-洋紅-紅
inferno 黑-紅-黃
jet 藍-青-黃-紅
magma 黑-紅-白
pink 黑-粉-白
plasma 綠-紅-黃
prism  紅-黃-綠-藍-紫-...-綠模式
spring 洋紅-黃
summer 綠-黃
viridis 藍-綠-黃
winter 藍-綠

cm=‘Spectral‘    #hot bone cool copper gray hsv inferno jet magma pink plasma summer viridis bwr ocean rainbow coolwarm Spectral......................
norm = matplotlib.colors.Normalize(vmin=min, vmax=max)
map=plt.imshow(plt_arr,interpolation=‘nearest‘,cmap=cm,norm=norm, origin=‘upper‘) # plt_arr是要顯示的資料
mydpi=1000
plt.savefig("filename.png", dpi=mydpi ,bbox_inches=‘tight‘, pad_inches=0) # ,bbox_inches=‘tight‘ less white area
plt.show()

映像執行個體:

hsv

hot

cool

rainbow

 gist_earth

 

python matplotlib包映像色彩配置

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.