グラフィックス参考実例集:パイチャート
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
COLOR(red){SIZE(20){グラフィックス参考実例集:パイチャー...
([[グラフィックス参考実例集]]に戻る。[[Rのグラフィックス...
説明するまでもない円グラフ(パイチャート)。関数pieで円グラ...
重要:雑誌や新聞などでは普通は,上の定義とは違う円グラフ,...
> pie(1:5)
のように、単にベクトルだけを与えるのが最も簡単な使い方で...
-barplotと同様に、関数pieにもdensity、angle、 colなどの引...
-引数 inner とouter、rotateでラベルの位置、向きなどを細か...
-引数explodeには論理ベクトル、あるいはas.integerで整数に...
pie で得られる解説によれば、pie chart における角度による...
#contents
~
** rainbow カラーパレット24段階で使用。データを度数で与え...
pie1 <- function () {
pie(rep(1, 24), col = rainbow(24), radius = 0.9)
}
#ref(グラフィックス参考実例集:パイチャート/pie1.png, left)
**既定の色指定と注釈。データを比率で与える [#he9114e0]
pie2 <- function () {
pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
names(pie.sales) <- c("Blueberry", "Cherry",
"Apple", "Boston Cream", "Other"...
pie(pie.sales) # default colours
}
#ref(pie2.png, left)
** 項目を増やすと [#qd4b774a]
pie8 <- function () {
pie.sales <- c(0.12, 0.15, 0.15, 0.16, 0.10, 0.16, 0.0...
pie(pie.sales) # default colours
}
#ref(グラフィックス参考実例集:パイチャート/pie8.png, left)
**色の個別指定 [#e7e648f7]
pie3 <- function () {
pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
pie(pie.sales,
col = c("purple", "violetred1", "green3", "cornsil...
}
#ref(グラフィックス参考実例集:パイチャート/pie3.png, left)
** グレイスケールを6段階(0.4,0.5,...,1.0)で使用 [#mc7a39ae]
pie4 <- function () {
pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
pie(pie.sales, col = gray(seq(0.4,1.0,length=6)))
}
#ref(グラフィックス参考実例集:パイチャート/pie4.png, left)
** 線ハッチング。density で線密度指定、angle で線の角度を...
pie5 <- function () {
pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
pie(pie.sales, density = 10, angle = 15 + 10 * 1:6)
}
#ref(グラフィックス参考実例集:パイチャート/pie5.png, left)
** rainbow カラーパレットを細かく指定することにより連続的...
pie6 <- function () {
n <- 200
pie(rep(1,n), labels="", col=rainbow(n), border=NA,
main = "pie(*, labels=\"\", col=rainbow(n), border...
}
#ref(グラフィックス参考実例集:パイチャート/pie6.png, left)
終了行:
COLOR(red){SIZE(20){グラフィックス参考実例集:パイチャー...
([[グラフィックス参考実例集]]に戻る。[[Rのグラフィックス...
説明するまでもない円グラフ(パイチャート)。関数pieで円グラ...
重要:雑誌や新聞などでは普通は,上の定義とは違う円グラフ,...
> pie(1:5)
のように、単にベクトルだけを与えるのが最も簡単な使い方で...
-barplotと同様に、関数pieにもdensity、angle、 colなどの引...
-引数 inner とouter、rotateでラベルの位置、向きなどを細か...
-引数explodeには論理ベクトル、あるいはas.integerで整数に...
pie で得られる解説によれば、pie chart における角度による...
#contents
~
** rainbow カラーパレット24段階で使用。データを度数で与え...
pie1 <- function () {
pie(rep(1, 24), col = rainbow(24), radius = 0.9)
}
#ref(グラフィックス参考実例集:パイチャート/pie1.png, left)
**既定の色指定と注釈。データを比率で与える [#he9114e0]
pie2 <- function () {
pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
names(pie.sales) <- c("Blueberry", "Cherry",
"Apple", "Boston Cream", "Other"...
pie(pie.sales) # default colours
}
#ref(pie2.png, left)
** 項目を増やすと [#qd4b774a]
pie8 <- function () {
pie.sales <- c(0.12, 0.15, 0.15, 0.16, 0.10, 0.16, 0.0...
pie(pie.sales) # default colours
}
#ref(グラフィックス参考実例集:パイチャート/pie8.png, left)
**色の個別指定 [#e7e648f7]
pie3 <- function () {
pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
pie(pie.sales,
col = c("purple", "violetred1", "green3", "cornsil...
}
#ref(グラフィックス参考実例集:パイチャート/pie3.png, left)
** グレイスケールを6段階(0.4,0.5,...,1.0)で使用 [#mc7a39ae]
pie4 <- function () {
pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
pie(pie.sales, col = gray(seq(0.4,1.0,length=6)))
}
#ref(グラフィックス参考実例集:パイチャート/pie4.png, left)
** 線ハッチング。density で線密度指定、angle で線の角度を...
pie5 <- function () {
pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
pie(pie.sales, density = 10, angle = 15 + 10 * 1:6)
}
#ref(グラフィックス参考実例集:パイチャート/pie5.png, left)
** rainbow カラーパレットを細かく指定することにより連続的...
pie6 <- function () {
n <- 200
pie(rep(1,n), labels="", col=rainbow(n), border=NA,
main = "pie(*, labels=\"\", col=rainbow(n), border...
}
#ref(グラフィックス参考実例集:パイチャート/pie6.png, left)
ページ名: