【Python】讓Python Matplotlib使用事半功倍!
當可視化時,記不清楚圖形Marker名稱、colormap名稱、坐標軸刻度設置、圖例設置等等時,稍微掃描一眼該手冊,直接YYDS。
高清PNG獲取,見文末。
下面簡單介紹一下這個手冊:
0、圖中各位置設置
這張圖能幫助更好的了解matplotlib中圖形結構、Figure和axes之間的關系 ,
關于Matplotlib圖形詳細結構:
類似MATLAB: 詳解Python Matplotlib(pyplot法)[1]
面向?qū)ο螅?span style="font-size: 12px;">詳解Python Matplotlib(面向?qū)ο蠓?[2]
1、標記Marker設置
包括marker的邊框 (edge)顏色、填充 (face)顏色、邊框線磅值、邊框size等等。
更多關于marker設置:一文掌握Matplotlib marker使用[3]
2、線line設置
包括線填充色、線磅值、線頭 (cap style)形狀、線型等等。
更多關于line設置:一文掌握Matplotlib linestyle使用[4]
3、多邊形使用設置

4、坐標軸刻度設置
不添加刻度,主刻度、副刻度混合使用,科學計數(shù)法等等。
關于刻度設置:詳解Matplotlib 坐標軸|刻度值|刻度|標題設置[5]
5、圖例設置
如何圖例個性化,??
更多關于圖例:詳解Matplotlib圖例(legend)[6]
6、配色選擇
記不清楚colormap名稱,掃一眼即可,
這里只是介紹了Matplotlib內(nèi)置colormap,更多介紹:
Python matplotlib-內(nèi)置單顏色(一)[7] Python matplotlib-外部單顏色(二)[8] Python matplotlib內(nèi)置colormap(三)[9] Python matplotlib外部colormap(四)[10] Python Seaborn顏色及colormap (五)[11]
不一一介紹了~ ,有幫助求三連!
高清PNG獲取
點擊關注「pythonic生物人」回復mp
「pythonic生物人」??系統(tǒng)分享數(shù)據(jù)科學干貨,下劃線點擊直達??:Python可視化、R可視化、Python精進、圖解統(tǒng)計學、機器學習、科研等,一起來精進吧~
參考資料
詳解Python Matplotlib (pyplot法): https://mp.weixin.qq.com/s?__biz=MzUwOTg0MjczNw==&mid=2247509990&idx=1&sn=fdf5c950864f8ca3a1a0d1c1ae129d78&chksm=f90ee3b8ce796aae9365de7323382514931b5368b79059e6f7836c1ef9c68e9443dc31f73c04&token=1948616811&lang=zh_CN#rd
[2]詳解Python Matplotlib (面向?qū)ο蠓?: https://mp.weixin.qq.com/s?__biz=MzUwOTg0MjczNw==&mid=2247504663&idx=1&sn=cb971c48f35f83562e6381a67ca85799&scene=21#wechat_redirect
[3]一文掌握Matplotlib marker使用: https://mp.weixin.qq.com/s/xwFhWBXNgGi3p10bpTs0Jg
[4]一文掌握Matplotlib linestyle使用: https://mp.weixin.qq.com/s/xwFhWBXNgGi3p10bpTs0Jg
[5]詳解Matplotlib 坐標軸|刻度值|刻度|標題設置: https://mp.weixin.qq.com/s/LVU51b3HcYXircHQirlgcA
[6]詳解Matplotlib圖例(legend): https://mp.weixin.qq.com/s/vh6W7-pOczoyc2Lqiiix0Q
[7]Python matplotlib-內(nèi)置單顏色(一): https://mp.weixin.qq.com/s?__biz=MzUwOTg0MjczNw==&mid=2247484253&idx=1&sn=45002543ed2b320a139a0b724372cad6&chksm=f90d4703ce7ace151c99761ca0c52c1ed76fff2c3e92ac3c6b9a1131b04ec4ce9686be42cfdd&scene=21#wechat_redirect
[8]Python matplotlib-外部單顏色(二): https://mp.weixin.qq.com/s?__biz=MzUwOTg0MjczNw==&mid=2247484291&idx=1&sn=22ff03a3be940883e8c639e2ec4bd581&chksm=f90d47ddce7acecba9fd2057cd5127abeb48cb0089fde39a0a2f75d965995970ce1d9bebf8a4&scene=21#wechat_redirect
[9]Python matplotlib內(nèi)置colormap(三): https://mp.weixin.qq.com/s?__biz=MzUwOTg0MjczNw==&mid=2247484329&idx=1&sn=20ec36f7f5077221671b32d47c3412c8&chksm=f90d47f7ce7acee11449c5584a11a020cf05c27f7a60b9357bbdc35181cc7e8420c594d09fc5&scene=21#wechat_redirect
[10]Python matplotlib外部colormap(四): https://mp.weixin.qq.com/s?__biz=MzUwOTg0MjczNw==&mid=2247500421&idx=1&sn=1e81cdfe414e6962c8162e0240a39363&chksm=f90e86dbce790fcdcf178462d0da911d8af6fde0cea6235fc55b5d40f086fdaced78830355c2&token=1948616811&lang=zh_CN#rd
[11]Python Seaborn顏色及colormap (五): https://mp.weixin.qq.com/s/s926ITT9opbzans5-muDEg
往期精彩回顧
適合初學者入門人工智能的路線及資料下載 (圖文+視頻)機器學習入門系列下載 機器學習及深度學習筆記等資料打印 《統(tǒng)計學習方法》的代碼復現(xiàn)專輯 機器學習交流qq群955171419,加入微信群請掃碼
