python matplotlib包圖像配色方案分享
可選的配色方案:
Accent, Accent_r, Blues, Blues_r, BrBG, BrBG_r, BuGn, BuGn_r, BuPu, BuPu_r, CMRmap, CMRmap_r, Dark2, Dark2_r, GnBu, GnBu_r, Greens, Greens_r, Greys, Greys_r, OrRd, OrRd_r, Oranges, Oranges_r, PRGn, PRGn_r, Paired, Paired_r, Pastel1, Pastel1_r, Pastel2, Pastel2_r, PiYG, PiYG_r, PuBu, PuBuGn, PuBuGn_r, PuBu_r, PuOr, PuOr_r, PuRd, PuRd_r, Purples, Purples_r, RdBu, RdBu_r, RdGy, RdGy_r, RdPu, RdPu_r, RdYlBu, RdYlBu_r, RdYlGn, RdYlGn_r, Reds, Reds_r, Set1, Set1_r, Set2, Set2_r, Set3, Set3_r, Spectral, Spectral_r, Wistia, Wistia_r, YlGn, YlGnBu, YlGnBu_r, YlGn_r, YlOrBr, YlOrBr_r, YlOrRd, YlOrRd_r, afmhot, afmhot_r, autumn, autumn_r, binary, binary_r, bone, bone_r, brg, brg_r, bwr, bwr_r, cividis, cividis_r, cool, cool_r, coolwarm, coolwarm_r, copper, copper_r, cubehelix, cubehelix_r, flag, flag_r, gist_earth, gist_earth_r, gist_gray, gist_gray_r, gist_heat, gist_heat_r, gist_ncar, gist_ncar_r, gist_rainbow, gist_rainbow_r, gist_stern, gist_stern_r, gist_yarg, gist_yarg_r, gnuplot, gnuplot2, gnuplot2_r, gnuplot_r, gray, gray_r, hot, hot_r, hsv, hsv_r, inferno, inferno_r, jet, jet_r, magma, magma_r, nipy_spectral, nipy_spectral_r, ocean, ocean_r, pink, pink_r, plasma, plasma_r, prism, prism_r, rainbow, rainbow_r, seismic, seismic_r, spring, spring_r, summer, summer_r, tab10, tab10_r, tab20, tab20_r, tab20b, tab20b_r, tab20c, tab20c_r, terrain, terrain_r, viridis, viridis_r, winter, winter_r
常用的幾個(gè):
示例代碼:
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是要顯示的數(shù)據(jù) mydpi=1000 plt.savefig("filename.png", dpi=mydpi ,bbox_inches='tight', pad_inches=0) # ,bbox_inches='tight' less white area plt.show()
圖像實(shí)例:
hsv
hot
cool
rainbow
gist_earth
以上這篇python matplotlib包圖像配色方案分享就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
python中pygame針對(duì)游戲窗口的顯示方法實(shí)例分析(附源碼)
這篇文章主要介紹了python中pygame針對(duì)游戲窗口的顯示方法,以完整實(shí)例形式較為詳細(xì)的分析了pygame響應(yīng)鍵盤按鍵改變窗口顯示效果的相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下2015-11-11python爬蟲(chóng)指南之xpath實(shí)例解析(附實(shí)戰(zhàn))
在進(jìn)行網(wǎng)頁(yè)抓取的時(shí)候,分析定位html節(jié)點(diǎn)是獲取抓取信息的關(guān)鍵,目前我用的是lxml模塊,下面這篇文章主要給大家介紹了關(guān)于python爬蟲(chóng)指南之xpath實(shí)例解析的相關(guān)資料,需要的朋友可以參考下2022-01-01通過(guò)python 執(zhí)行 nohup 不生效的解決
這篇文章主要介紹了通過(guò)python 執(zhí)行 nohup 不生效的解決,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2020-04-04django 微信網(wǎng)頁(yè)授權(quán)登陸的實(shí)現(xiàn)
這篇文章主要介紹了django 微信網(wǎng)頁(yè)授權(quán)登陸的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-07-07Python中的response.text與content區(qū)別詳解
這篇文章主要介紹了Python中的response.text與content區(qū)別詳解,?從網(wǎng)絡(luò)請(qǐng)求下來(lái)的數(shù)據(jù),他們都是字節(jié)類型的,如果服務(wù)器不指定的話,默認(rèn)編碼是"ISO-8859-1",我們使用text直接拿到的是字符串類型,沒(méi)有進(jìn)行解碼操作,則會(huì)出現(xiàn)亂碼問(wèn)題,需要的朋友可以參考下2023-12-12基于python實(shí)現(xiàn)matlab filter函數(shù)過(guò)程詳解
這篇文章主要介紹了基于python實(shí)現(xiàn)matlab filter函數(shù)過(guò)程詳解,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2020-06-06Python實(shí)現(xiàn)決策樹(shù)并且使用Graphviz可視化的例子
今天小編就為大家分享一篇Python實(shí)現(xiàn)決策樹(shù)并且使用Graphviz可視化的例子,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2019-08-08python通過(guò)函數(shù)名調(diào)用函數(shù)的幾種場(chǎng)景
這篇文章主要介紹了python通過(guò)函數(shù)名調(diào)用函數(shù)的幾種場(chǎng)景,幫助大家更好的理解和使用python,感興趣的朋友可以了解下2020-09-09python在線編譯器的簡(jiǎn)單原理及簡(jiǎn)單實(shí)現(xiàn)代碼
這篇文章主要介紹了python在線編譯器的簡(jiǎn)單原理及簡(jiǎn)單實(shí)現(xiàn)代碼,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2018-02-02