Posted Python鏁版嵁绉戝
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了相关的知识,希望对你有一定的参考价值。
Photo by Jason Coudriet on Unsplash
鏂?nbsp;| 閭诲窛
鏉ユ簮 | 闃块噷宸村反涓棿浠?/span>
绋嬪簭鍛樻噦鐢诲浘锛屼竴瀹濆彉涓夊疂銆?/span>
- 姝f枃寮€濮?-
馃帓
甯稿惉鍒颁竴鍙ヨ瘽锛屸€滆兘鐢ㄥ浘鎻忚堪鐨勫氨涓嶇敤琛紝鑳界敤琛ㄥ氨涓嶇敤鏂囧瓧鈥濄€?/span>杩欏彞璇濅篃鐩存帴鐨勮〃鏄庝簡锛氬湪璁ょ煡涓婏紝澶у瀵逛簬鍥惧舰鐨勬晱鎰熷害杩滄瘮鏂囧瓧楂樸€?/span>
浣嗗悓鏃舵垜浠篃闈复鐫€杩欐牱涓€浜涢棶棰橈細
鍐?PPT銆佸仛 demo 鏃讹紝蹇冧腑鏈変竾鍗冩兂娉曞拰娴烽噺鏁版嵁鎯宠鍘诲睍鐜帮紝浣嗘€绘槸鏈€鍚庤繕鏄互鏂囧瓧鍜屾灟鐕ョ殑鍥捐〃鍫嗗彔鍛堢幇浜嗗嚭鏉ワ紝鑻︿簬鎬庝箞鎶婅繖浜涙暟鎹睍鐜扮殑鐩磋銆佹€ф劅銆佷竴鐪嬪氨鎳傘€?/span>
杩欐椂鍊欙紝鍦ㄥ績閲屾€庝箞鎯冲拰鎵嬩笂鎬庝箞鐢讳箣闂达紝宸簡涓€搴р€滅悊瑙e浘琛ㄥ唴娑碘€濈殑妗ユ浜嗐€?/span>
甯歌鐨勫浘琛ㄩ€夋嫨鍘熷垯鏂囩珷鏈夊緢澶氾紝杩欓噷鍙仛绠€鍗曟€荤粨锛岄噸鐐规槸浠庨€嗗悜鏉ョ湅甯歌鍦烘櫙閫夌敤浠ュ強鎸夌収鏁版嵁鍏崇郴閫夌敤锛屾渶鍚庢槸浣跨敤涓細閬囧埌鐨勪竴浜涘父瑙侀棶棰樸€傛湰鏂囧皢鍒嗕负浠ヤ笅涓ら儴鍒嗭細
涓や釜浼樼鐨勬暟鎹彲瑙嗗寲妗堜緥
鍩虹鍥惧舰鍙婄壒鐐?/span>
濡備綍閫夌敤鍥炬爣
甯歌鐨勯棶棰?br>
浣滀负瑙嗚鍔ㄧ墿鐨勬垜浠紝涓嶅Θ鍏堟潵鐪嬬湅鎯婅壋鍏ㄧ悆鐨勪竴浜涙暟鎹彲瑙嗗寲鐨勪緥瀛愶紙鍘熸枃閾炬帴锛夈€?/span>
涓や釜浼樼鐨勬暟鎹彲瑙嗗寲妗堜緥
A. 鎸夊勾榫勬鍒嗗竷鐨勭編鍥戒汉鍙g櫨鍒嗘瘮锛?/span>
杩欎釜 GIF 鍔ㄧ敾锛屾樉绀轰簡闅忕潃鏃堕棿鎺ㄧЩ鐨勪汉鍙g粺璁℃暟閲忕殑鍙樺寲銆?/span>杩欐槸濡備綍浠ヤ护浜轰俊鏈嶇殑鏂瑰紡鍛堢幇涓€绉嶅崟涓€鐨勬暟鎹殑濂芥鏍枫€?/span>
B. 鏈€鏈変环鍊肩殑杩愬姩闃?/span>
杩欐槸閫氳繃鍙犲姞鏁版嵁鏉ヨ杩版繁灞傛晠浜嬬殑涓€涓緥瀛愩€?/span>
杩欎釜浜や簰鐢?ColumnFive 璁捐锛屽彈绂忓竷鏂€?014骞存渶鍏蜂环鍊肩殑杩愬姩闃?0寮衡€濆悕鍗曞緱鍒扮殑鍚彂銆備絾鏄畠涓嶄粎灏嗗垪琛ㄥ彲瑙嗗寲锛岀敤鎴疯繕鍙互閫氳繃瀹冪湅鍒版瘡鏀槦浼嶅弬璧涚殑鏃堕棿浠ュ強澶哄緱鎬诲啝鍐涚殑鏁伴噺銆傝繖涓哄悇闃熺殑鍘嗗彶鍜屾垚鍔熸彁渚涗簡鏇村叏闈㈢殑鐪嬫硶銆?/span>
鍩虹鍥惧舰鍙婄壒鐐?/span>
鎺ヤ笅鏉ョ粰澶у浠嬬粛涓嬫暟鎹彲瑙嗗寲鍥捐〃鐨勫熀鏈被鍨嬪拰閫夌敤鍘熷垯锛?/span>閫夌敤姝g‘鐨勬暟鎹彲瑙嗗寲鐨勫浘琛ㄣ€?/span>
鈶?鏌卞舰鍥撅紙Bar Chart锛?/span>
浼樺娍锛?/span>鏌卞舰鍥惧埄鐢ㄦ煴瀛愮殑楂樺害锛岃兘澶熸瘮杈冩竻鏅扮殑鍙嶆槧鏁版嵁鐨勫樊寮傦紝涓€鑸儏鍐典笅鐢ㄦ潵鍙嶆槧鍒嗙被椤圭洰涔嬮棿鐨勬瘮杈冿紝涔熷彲浠ョ敤鏉ュ弽鏄犳椂闂磋秼鍔裤€?/span>
娉ㄦ剰锛?/span>鏌卞舰鍥剧殑灞€闄愬湪浜庡畠浠呴€傜敤浜庝腑灏忚妯$殑鏁版嵁闆嗭紝褰撴暟鎹緝澶氭椂灏变笉鏄撳垎杈ㄣ€備竴鑸€岃█锛屼笉瑕佽秴杩?0涓€?/span>
閫氬父鏉ヨ锛屾煴褰㈠浘鐨勬í杞存槸鏃堕棿缁村害锛岀敤鎴蜂範鎯€ц涓哄瓨鍦ㄦ椂闂磋秼鍔裤€傚鏋滈亣鍒版í杞翠笉鏄椂闂寸淮搴︾殑鎯呭喌锛屽缓璁敤棰滆壊鍖哄垎姣忔牴鏌卞瓙銆?nbsp;
琛嶇敓 - 鍫嗗彔鏌辩姸鍥撅細
涓嶄粎鍙互鐩磋鐨勭湅鍑烘瘡涓郴鍒楃殑鍊硷紝杩樿兘澶熷弽鏄犲嚭绯诲垪鐨勬€诲拰锛屽挨鍏舵槸褰撻渶瑕佺湅鏌愪竴鍗曚綅鐨勭患鍚堜互鍙婂悇绯诲垪鍊肩殑姣旈噸鏃讹紝姣斿锛?-8鏈堜鸡鏁﹀拰鏌忔灄鎴夸骇浜ゆ槗绗旀暟锛堜竾锛夈€?nbsp;
鈶?鏉″舰鍥?Bar Chart)
浼樺娍锛?/span>鏉″舰鍥剧敤鏉ュ弽鏄犲垎绫婚」鐩箣闂寸殑姣旇緝锛岄€傚悎搴旂敤浜庤法绫诲埆姣旇緝鏁版嵁銆傚湪鎴戜滑闇€瑕佹瘮杈冮」绫荤殑澶у皬銆侀珮浣庢椂閫傚悎浣跨敤鏉″舰鍥俱€?nbsp;
鈶?鎶樼嚎鍥?Line Chart)
浼樺娍锛?/span>鎶樼嚎鍥剧敤鏉ュ弽鏄犻殢鏃堕棿鍙樺寲鐨勮秼鍔裤€傚綋鎴戜滑闇€瑕佹弿杩颁簨鐗╅殢鏃堕棿缁村害鐨勫彉鍖栨椂甯稿父闇€瑕佷娇鐢ㄨ鍥惧舰銆?nbsp;
琛嶇敓 - 鍏夋粦鎶樼嚎鍥撅紙Smooth line chart锛?/span>锛?/span>
鍋囧鍏虫敞鐨勬槸鏁版嵁鍙嶆槧鐨勬暣浣撹秼鍔匡紝鍏夋粦鎶樼嚎鍥炬渶閫傚悎锛屽挨鍏舵槸褰撴暟鎹尝鍔ㄨ緝澶ф椂锛岄噰鐢ㄦ姌绾垮浘浼氭樉寰楀緢涔便€?/span>
琛嶇敓 - 闈㈢Н鍥撅紙Area chart锛夛細
鎶樼嚎鍥句笅鏂瑰~鍏呴槾褰憋紝鏋勬垚闈㈢Н鍥撅紝濡傛灉鏈変袱涓垨浠ヤ笂鎶樼嚎鍥撅紝鍦ㄥ悇鑷姌绾跨殑涓嬫柟濉厖涓嶅悓棰滆壊鐨勯槾褰憋紝鏋勬垚鍫嗙Н闈㈢Н鍥撅紝渚夸簬浜嗚В鎶樼嚎鐨勭浉瀵瑰崰姣?/span>
鈶?楗煎浘锛圥ie Chart锛?/span>
娉ㄦ剰锛?/span>楗煎浘鏄竴绉嶅簲璇ラ伩鍏嶄娇鐢ㄧ殑鍥捐〃锛屽洜涓鸿倝鐪煎闈㈢Н澶у皬涓嶆晱鎰熴€傛槸鏈€瀹规槗琚鐢ㄧ殑銆?/span>浣嗗湪鍏蜂綋鍙嶆槧鏌愪釜姣旈噸鐨勬椂鍊欙紝閰嶄笂鍏蜂綋鏁板€硷紝浼氭湁杈冨ソ鐨勬晥鏋溿€?/span>
鍦ㄩ渶瑕佹弿杩版煇涓€閮ㄥ垎鍗犳€讳綋鐨勭櫨鍒嗘瘮鏃讹紝閫傚悎浣跨敤楗煎浘銆?/span>渚嬪锛氬崰鎹叕鍙稿叏閮ㄨ祫閲戜竴鍗婄殑涓や釜娓犻亾锛涙煇鍏徃鍛樺伐鐨勭敺濂虫瘮渚嬬瓑銆?/span>
鑰岄渶瑕佹瘮杈冩暟鎹椂锛屽挨鍏舵槸姣旇緝涓や釜浠ヤ笂鏁翠綋鐨勬垚鍒嗘椂锛岃鍔″繀浣跨敤鏉″舰鍥炬垨鏌卞舰鍥撅紝鍒囧嬁瑕佹眰鐪嬪浘浜哄皢鎵囧舰杞崲鎴愭暟鎹湪楗煎浘闂寸浉浜掓瘮杈冿紝鍥犱负浜虹殑鑲夌溂瀵归潰绉ぇ灏忎笉鏁忔劅锛屼細瀵艰嚧瀵规暟鎹殑璇銆?/span>
鍙﹀锛屼负浜嗕娇楗煎浘鍙戞尌鏈€澶т綔鐢紝鍦ㄤ娇鐢ㄤ腑涓€鑸笉瀹滆秴杩?涓儴鍒嗭紝濡傞渶瑕佽〃杈?涓互涓婄殑閮ㄥ垎锛屼篃璇蜂娇鐢ㄦ潯褰㈠浘锛屾墖褰㈣竟涓暟杩囧锛屼細瀵艰嚧楗煎浘鍒嗗潡鐨勬剰涔夎В閲婅繃浜庡洶闅俱€備笉瑕佸嚭鐜颁笅闈煈囪繖绉嶉ゼ鍥俱€?/span>
鈶?鏁g偣鍥?Scatter Chart)
鏁g偣鍥剧殑鏁版嵁涓轰笁缁存暟鎹紝浣跨敤涓ょ粍鏁版嵁鏋勬垚澶氫釜鍧愭爣鐐癸紝鍒嗘瀽鍧愭爣鐐圭殑鍒嗗竷鎯呭喌锛屽垽鏂袱涓彉閲忎箣闂寸殑鍏宠仈鎴栧垎甯冭秼鍔裤€?/span>
鍙互鐢ㄩ鑹插尯鍒嗙郴鍒楋紝涔熷彲浠ョ敤鏁g偣澶у皬瀹氱涓夌淮搴︼紝杩欏氨琛嶇敓鍥惧嚭浜嗘皵娉″浘銆?/span>
鈶?姘旀场鍥撅紙Bubble chart锛?/span>
姘旀场鍥炬槸鏁g偣鍥剧殑涓€绉嶈鐢燂紝閫氳繃姣忎釜鐐圭殑闈㈢Н澶у皬鏉ヨ 閲忕涓夌淮搴︼紝閫傚悎涓夌淮鏁版嵁鐨勫姣旓紝涓旈渶瑕佸己璋冪涓夌淮锛岃秴杩囦笁缁村氨鎼炰笉瀹氥€?/span>
琛嶇敓 - 鍔涘姘旀场鍥撅紙Mechanical bubble chart锛?nbsp;
鈶?闆疯揪鍥撅紙radar chart锛?/span>
闆疯揪鍥鹃€傜敤浜庡缁存暟鎹紙鍥涚淮浠ヤ笂锛夛紝涓旀瘡涓淮搴﹀繀椤诲彲浠ユ帓搴忋€傛暟鎹偣涓€鑸?涓乏鍙筹紝澶鐨勮瘽杈ㄥ埆璧锋潵鏈夊洶闅俱€?/span>
濡備綍閫夌敤鍥炬爣
鍦ㄨ瀹屼簡姣忕鍥捐〃鐨勪紭鍔垮拰缂虹偣锛屼娇鐢ㄧ蹇屽锛屾帴涓嬫潵灏辫涓哄ぇ瀹朵粙缁嶏細
鈶?鎸夊簲鐢ㄥ満鏅€夋嫨
铏界劧鍥捐〃绉嶇被绻佸锛屼絾鏄熀浜庝娇鐢ㄥ満鏅ぇ鑷村彲浠ュ垎涓轰互涓嬪嚑绉嶆儏鍐点€?/span>
鍩轰簬杩欎釜澶ц嚧鐨勫簲鐢ㄥ満鏅紝鍙互鍒濇閫夊嚭鍙敤鐨勫彲瑙嗗寲鍥撅紝浣嗗浜庣粏寰殑閫夋嫨宸紓锛屽湪涓嬮潰浼氳繘涓€姝ョ殑闃愯堪锛涘浜庡崟涓€鐨勫彲瑙嗗寲鍥炬棤娉曟弧瓒抽渶瑕佹椂锛屽氨闇€瑕佽€冭檻缁勫悎灞曠ず锛岃繖閲屾殏涓斾笉杩囧璋堛€?/span>
鈶?鎸夋暟鎹叧绯婚€夋嫨
鏍规嵁鍙鍖栦笓瀹?Andrew Abela 瀵硅鏁版嵁鍏崇郴鍒嗙被鏂瑰紡鐨勬彁鐐硷紝浠栨彁鍑哄皢鍥捐〃灞曠ず鐨勬暟鎹叧绯诲垎涓哄洓绫伙細姣旇緝銆佸垎甯冦€佹瀯鎴愬拰鑱旂郴銆備笅闈㈠杩欏洓绉嶅叧绯讳互鍙婂簲鐢ㄤ妇渚嬪拰瀵瑰簲鐨勫彲瑙嗗寲瑙e喅鏂规鍋氫簡绠€瑕佺殑鍒嗘瀽銆?/span>
澶ч儴鍒嗘儏鍐典笅锛屾垜浠牴鎹繖浠介€夋嫨鎸囧崡鎸夊浘绱㈤灏卞彲浠ユ壘鍒帮紝鏂逛究鍙堣交鏉撅紝鍦ㄥ疄闄呭簲鐢ㄤ腑锛屼篃瀛樺湪闇€瑕佸睍绀哄绉嶆暟鎹叧绯荤殑鎯呭喌锛岄偅涔堝搴旂殑鍥捐〃绫诲瀷涔熸槸姣忕鍏崇郴瀵瑰簲鐨勫熀鏈浘褰㈢殑缁煎悎杩愮敤銆備緥濡傚涓椂闂寸偣涓婃瀯鎴愮殑姣旇緝绛夈€?/span>
甯歌闂
鏈€鍚庢暣鐞嗕簡涓€浜涘父瑙侀棶棰橈紝渚涘ぇ瀹跺湪瀹為檯鎿嶄綔涓娇鐢ㄣ€?/span>
Q: 鏌卞舰鍥惧拰鏉″舰鍥鹃兘鍙互琛ㄧず鍒嗙被姣旇緝锛岄偅涓よ€呭湪浣跨敤涓婃湁浣曞樊寮傚憿锛?/span>
A: 褰撴墍姣旇緝椤圭洰鐨勬爣绛炬枃鏈瘮杈冮暱鏃讹紝鏌卞舰鍥剧殑妯酱涓嬬殑鏍囩浼氬嚭鐜伴噸鍙犳垨鑰呭€炬枩锛屼笖鍗犵敤绌洪棿澶э紝褰卞搷闃呰鑰呯殑鐩厜绉诲姩銆?/span>鎵€浠ュ湪琛ㄧず鍒嗙被鏃讹紝濡傞」鐩暟閲忚緝灏戯紝浣跨敤鏌卞舰鍥炬垨鏉″舰鍥惧潎鍙紝濡傞」鐩甠鏁伴噺杈冨_锛屽垯寤鸿浣跨敤_鏉″舰鍥綺銆?/span>
Q: 鏌卞舰鍥惧拰鎶樼嚎鍥鹃兘鍙互琛ㄧず鏃堕棿搴忓垪鐨勮秼鍔匡紝濡備綍閫夋嫨锛?/span>
A: 涓€鑸潵璇达紝寤鸿浣跨敤鎶樼嚎鍥惧弽鏄犺秼鍔垮彉鍖栥€?/span>鏌卞舰鍥惧己璋冨悇鏁版嵁鐐瑰€间箣闂寸殑宸紓锛屾姌绾垮浘鍒欏己璋冭捣浼忓彉鍖栫殑瓒嬪娍锛涙煴褰㈠浘鏇撮€備簬琛ㄧ幇绂绘暎鍨嬬殑鏃堕棿搴忓垪锛宊鎶樼嚎鍥鹃€傚悎琛ㄧ幇杩炵画鍨嬬殑鏃堕棿搴忓垪_銆?/span>鎵€浠ュ綋鏃堕棿搴忓垪鐨刜鏁版嵁鐐硅緝灏戞椂锛屽彲浠ヤ娇鐢ㄦ煴褰㈠浘_锛岃€屽綋鏁版嵁鐐硅緝澶氭椂锛屽垯寤鸿浣跨敤鎶樼嚎鍥俱€?/span>
Q: 闈㈢Н鍥惧拰鎶樼嚎鍥鹃兘鍙互琛ㄧず鏃堕棿搴忓垪鐨勮秼鍔匡紝涓よ€呬箣闂村浣曢€夋嫨锛?/span>
A: 褰撳彧灞曠ず涓€涓害閲忔暟鎹殑瓒嬪娍鏃讹紝涓よ€呭畬鍏ㄧ瓑浠凤紝閮藉彲浠ヤ娇鐢紝閫氬父浣跨敤鎶樼嚎鍥炬洿澶氥€?/span>
浣嗘槸锛屽綋鍦ㄥぇ鍨嬩細璁灞曠ず鏁版嵁鏃讹紝鍗宠鍥句汉绂诲浘琛ㄥ彲鑳借緝杩滅殑鎯呭喌锛屼娇鐢ㄩ潰绉浘鑳借鍚庢帓鐨勪汉鐪嬬殑鏇存竻妤氥€傚綋姣旇緝澶氫釜搴﹂噺鏁版嵁鐨勮秼鍔挎椂锛屽缓璁娇鐢ㄦ姌绾垮浘銆傚浣跨敤闈㈢Н鍥撅紝鍒欏瓨鍦ㄦ暟鎹簭鍒椾箣闂寸浉浜掗伄鎸$殑鎯呭喌锛岄櫎浜嗛潬杩戞í杞寸殑閭d釜鏁版嵁搴忓垪澶栵紝寰堥毦瑙傚療鍑哄叾浠栨暟鎹簭鍒楃殑鍙樺寲瓒嬪娍銆?/span>
Q: 鏄笉鏄簲璇ラ伩鍏嶄娇鐢ㄩゼ鍥撅紝鑳戒笉鐢ㄥ氨涓嶇敤锛?/span>
A: 浠庣簿纭瘮杈冩暟鎹殑瑙掑害鏉ヨ锛屾潯褰㈠浘鐨勭‘鏇存槗浜庢瘮杈冩暟鎹偣涔嬮棿鐨勫樊寮傦紝浣嗘瘡绉嶅浘琛ㄩ兘鏈夊畠鐨勯暱澶勫拰閫傜敤鍦烘櫙锛岄ゼ鍥捐兘缁欐垜浠竴绉嶆暣浣撳拰鏋勬垚鐨勫嵃璞★紝閫傜敤浜庤〃杈锯€滃崰姣斺€濃€斺€旂湅鍒伴ゼ鍥惧氨璁╂兂璧?00%锛岃繖涓壒鐐规槸鏉″舰鍥炬墍娌℃湁鐨勩€?/span>
浣嗘槸瑕佸敖閲忛伩鍏嶅苟鍒椾娇鐢ㄤ袱涓強浠ヤ笂鐨勯ゼ鍥撅紝铏界劧杩欑鐢ㄦ硶寰堝父瑙併€備緥濡傚涓嬪浘锛屽垎甯冨睍绀轰袱涓浗瀹跺湪涓嶅悓骞翠唤瀹跺涵鑺遍攢鍗犳瘮锛岀敱浜庤鍥句汉寰堥毦閫氳繃楗煎浘鐩存帴銆佸噯纭殑鐪嬪嚭鍚勪釜鍒嗙被鐨勫彉鍖栬秼鍔垮拰骞呭害锛岄渶瑕佸弽澶嶅湪4涓ゼ鍥句箣闂存瘮杈冨拰鍒ゆ柇锛屽鏋滃彉鍖栧箙搴︿笉澶э紝寰堝鏄撻€犳垚璇銆傛墍浠ュ悓鏍锋槸鎯宠〃绀哄崰姣旓紝杩欑鎯呭喌浣跨敤楗煎浘灏变笉鏄緢鏈夋晥鐨勫浘琛ㄥ舰寮忋€?/span>
鍏呭垎浜嗚В姣忕鍥捐〃绫诲瀷鐨勭壒寰侊紝閽堝浜庡疄闄呯殑浣跨敤鍦烘櫙锛屽垽瀹氬叾鏁版嵁鍏崇郴锛岀粨鍚堝満鏅垽瀹氬浘鍜屽浘琛ㄧ被鍨嬮€夋嫨鎸囧崡锛屼粠鑰屾湁鏁堢殑浼犻€掓暟鎹俊鎭紝璁╀綘鐨勬暟鎹洿鍔犵洿鐧斤紝make sense锛?/span>
涓撴敞浜庢暟鎹瀛﹂鍩熺殑鐭ヨ瘑鍒嗕韩
娆㈣繋鍦ㄦ枃绔犱笅鏂圭暀瑷€涓庝氦娴?/span>
鎺ㄨ崘闃呰
以上是关于的主要内容,如果未能解决你的问题,请参考以下文章