阿好伯
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    3
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- disqus: ahb0222 GA : G-VF9ZT413CG --- 一圖勝千表_數據可視化_基本圖表篇 === > [color=#40f1ef][name=LHB阿好伯, Jan 26, 2019 10:05 PM][:earth_africa:](https://www.facebook.com/LHB0222/) ###### tags: `R` ![](https://i.imgur.com/47HlvGH.png) [TOC] ### [為何我們需要可視化(visualization)?](https://b10231040.blogspot.com/2018/08/1.html) Webster 字典中visualization的定義如下。 Vi.su.al.i.za.tion [1] 1.Formation of mental visual images 2.The act or process of interpreting in visual terms or of putting into visible form. 將抽象的科學或者商業數據.用圖像表示出來.幫助理解數據的意義的過程。 它通常會在進行數據分析(data analysis)的過程中大量的使用 從數據展示需求的角度選擇恰當的圖表,可以更好的形式彰顯數據的潛在性、規律性與價值 數據的展現包括用圖表展示數據和用統計量描述數據等內容 圖表的類型有數十種以上 ![](https://i.imgur.com/j92iRKt.png) 不同的圖表展現出的資訊也不同 適合的資料呈現對於讀者來說能用最少的時間來了解你所呈現的內容 下面整理一些常見的圖表類型說明基本圖表的特點和適用場合 ## 柱狀圖(Bar Chart) 我們經常看到條形圖,很容易忽視它們的效果 條形圖可以顯示值隨時間的變化 適用場合是二維數據集(每組數據點包括兩個值x和y) 或者它們可以提供多個類別的直接比較 ![](https://i.imgur.com/JGdgmcv.jpg) 注意的是資料類別不適合過多 柱狀圖的X軸可以很適合用於時間維 讀者習慣性認為存在時間趨勢 如果遇到X軸不是時間維的情況,建議用顏色區分每根柱子 改變用戶對時間趨勢的關注 ![](https://i.imgur.com/YzMhwhL.jpg) 或是使用垂直排列的方式 ![](https://i.imgur.com/mliAyCK.jpg) ## 折線圖(Line Chart) 折線圖也適用場合是二維數據集(每組數據點包括兩個值x和y) 柱狀圖更適合呈現時間序列或是先後順序的差異 折線圖特別擅長於揭示數據的整體趨勢 ![](https://i.imgur.com/DuUyCFJ.jpg) 也適合多個二維數據集比較變動趨勢的交互關係 ![](https://i.imgur.com/2ALGfE2.jpg) ## 圓餅圖(Pie Chart) 圓餅圖是應避免使用的圖表 因為讀者對於面積大小並不敏感 ![](https://i.imgur.com/TcHq3kr.jpg) 下圓餅圖的五個色塊的面積大小排序並不容易看出來 若換成下面的換成柱狀圖就容易多了 ![](https://i.imgur.com/yuGLzED.jpg) 或者也可以嘗試一些變形的方式利用數據大小來表示其每個扇形半徑 這方式也稱為[南丁格爾玫瑰圖(Nightingale Rose Chart)](http://blog.infographics.tw/2016/02/nightingale-rose-chart/) ![](https://i.imgur.com/6HaZY7n.jpg) 或稱為風玫瑰圖(wind rose chart) ![](https://i.imgur.com/77oTLRY.jpg) ## 散佈圖(Scatter Chart) 柱狀圖通常對於可視化由單個數量組成的數據 散佈圖適用於三維數據集,但其中只有兩維需要比較 識別兩個維之間的關係類型 ![](https://i.imgur.com/uQ3NAsI.jpg) 如果點是彩色編碼的話,則可以顯示一個附加變量 ![](https://i.imgur.com/cigQ0Ce.jpg) 或是以三維方式呈現更多變量間的關係 ![](https://i.imgur.com/EeVmCOy.jpg) ## 氣泡圖(Bubble Chart) 氣泡圖是散佈圖的一種變型 通過每個點的面積大小 反映第三維的數據大小 ![](https://i.imgur.com/3huDn3X.jpg) 也常用於單一維度的資料比較 ![](https://i.imgur.com/R2eqXR9.jpg) 或者使用於地圖資料中 ![](https://i.imgur.com/eSClIt4.jpg) ## 雷達圖(Radar Chart) ### [雷達圖(Log座標) R 與 Sigmaplot 繪製方法](/bxJ65G4NR5-Z8R4ezyxEzw) 有著許多別稱 spider charts, polar charts, web charts, or star plots 與玫瑰圖有許多類似的地方 適用於多變量數據的可視化 並且通過多邊形的大小和形狀可以明顯看出總體差異 ![](https://i.imgur.com/CxgVMWC.jpg) ## 箱形圖(boxplot) ### [盒鬚圖(Boxplot) 中顯示最大最小值 R 繪製方法](/BewqeSD_QJWrzTJcQMRyMQ) 是一種用作顯示一組數據分散情況資料的統計圖 因型狀如箱子而得名。此圖中之盒子之外 也常會有線條在上下四分位數之外延伸出去,像是鬍鬚,因此也稱為盒鬚圖 ![](https://i.imgur.com/9zd7jIC.jpg) 盒鬚圖可以呈現許多資訊例如集中趨勢(中位數,平均值和分布模式) ### 小提琴圖(violin plot) 這算是盒鬚圖的變形 ![](https://i.imgur.com/nEWDlUX.jpg) 最大差異在他不規則的外型,顯示了資料分布密度 ![](https://i.imgur.com/287Dzk8.jpg) ### [beeswarm(?蜜蜂圖?)](http://www.cbs.dtu.dk/~eklund/beeswarm/) 蜜蜂圖為一特殊一維散點圖,例如“stripchart”,但具有緊密堆積的非重疊點, ![](https://i.imgur.com/HMINIo6.png) 相比於stripchart可以更好的展示數據的分布情況 ![](https://i.imgur.com/dNud5R8.png) ## 馬賽克圖(Mosaic plot) 是用於從兩個或更多個性質變量可視化數據的圖示方法 概述了數據的結構,並可以識別不同變量之間的關係 ![](https://i.imgur.com/Zh4COr4.jpg) ## 樹狀圖(Treemapping) 一種使用嵌套圖形(通常是矩形)顯示分層數據的方法 矩形面積表示出數據的大小 ![](https://i.imgur.com/QUxBA9f.jpg) ## 熱點圖(Heat map) 其中包含在一個矩陣單獨數值被以顏色表示數據大小的圖形 多運用於生物基因分析上的基因表現關係 ![](https://i.imgur.com/KEftIhB.jpg) ## 等高線圖(Contour map) 最常運用於地圖繪製上 如果您要找到兩組數據之間的最佳組合也非常適合 在實驗設計中的反應曲面法(Response surface methodology, RSM) 就會繪製等高線圖或曲面圖來觀察最佳配比與變數間趨勢 ![](https://i.imgur.com/Ank8ZZD.jpg) ## 桑基圖(Sankey diagram) 不同的線條代表了不同的流量分流情況,它的寬度成比例地顯示此分支佔有的流量 桑基圖通常應用於能源、材料成分、金融等資料視覺化分析 ![](https://i.imgur.com/P6f7gjG.jpg) ![](https://i.imgur.com/TD1dJFh.jpg) ### 三元項圖 - [使用R繪製三元相圖(Ternary plot)結合等高線圖(topographic map)](/6TmtB3XwSbSaG_0HQe1gKA) # 可視化線上服務 ## [plotly](https://plotly.com/) ![](https://i.imgur.com/BPvTpjl.png) ## [PLOTDB](https://plotdb.com/) 說了這麼多圖表在最後介紹一款線上的生成網站 內建非常多種圖表 ![](https://i.imgur.com/JIX09Qo.jpg) ![](https://i.imgur.com/4iG7l2L.gif) 用來製作簡報的圖表也非常適合 且不用安裝就可以直接使用 ![](https://i.imgur.com/BRmNrKZ.gif) ## 色盲在可視化上遇到的問題 有些配色對色盲和色弱讀者而言,要在圖表上分辨這些顏色恐怕有困難 這是許多可視化過程中會忽略的事情 而且還有一項功能就是可以測試配色對於色盲的讀者是否合適的功能 內建選單可以快速切換模式 讓我們了解到對於色盲讀者的觀看效果 ![](https://i.imgur.com/hCzXNsd.gif) ## [数据可视化工具目录](https://datavizcatalogue.com/ZH/index.html) ![](https://i.imgur.com/slg41OF.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully