How draw a stem -and -leaf amp; box-plot display by R.or Python
生活随笔
收集整理的這篇文章主要介紹了
How draw a stem -and -leaf amp; box-plot display by R.or Python
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
參考:
使用R進(jìn)行數(shù)據(jù)可視化套路之-莖葉圖、盒形圖
step by step
R 讀取數(shù)據(jù)
在網(wǎng)上下載的2013全國(guó)各省區(qū)GDP排名(exl文件)
先 另存為 data.txt(為了方便存到D盤文件夾下)
參考:R?讀?取?t?x?t?,?e?x?c?e?l?數(shù)?據(jù)?(百度文庫(kù)里的)
> data<-read.table("D:\\data.txt",header=T) > data
算是讀取出來(lái)了。。
。
nest step
畫 箱線圖
函數(shù)boxplot(x)
boxplot(data)
先這樣。下次再加入
Thanks,Baidu
因?yàn)樯厦婧腥珖?guó)的總數(shù)據(jù)。所以照成離散點(diǎn)比較遠(yuǎn) 等下優(yōu)化一下。。。
試想一下,能不能分幾個(gè)表來(lái)顯示這組數(shù)據(jù),這樣就更好了,難道不是嘛? 這種話,數(shù)據(jù)可能要變成一個(gè)決定因素,開展通過(guò)繪制一個(gè)箱形圖的每一列。(待定)版權(quán)聲明:本文博主原創(chuàng)文章。博客,未經(jīng)同意不得轉(zhuǎn)載。
轉(zhuǎn)載于:https://www.cnblogs.com/hrhguanli/p/4810458.html
總結(jié)
以上是生活随笔為你收集整理的How draw a stem -and -leaf amp; box-plot display by R.or Python的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: POJ C++程序设计 编程题#4:计
- 下一篇: define() vs const 该如