グラフィックス参考実例集:matplot
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
COLOR(red){SIZE(20){グラフィックス参考実例集:matplot}}
([[グラフィックス参考実例集]]に戻る。[[Rのグラフィックス...
matplot 関数は二つの行列の対応列毎の散布図を同時に描きま...
matplotは二つの 行列x、yをとり、その各列についてプロット...
#contents
~
** 例1。2種類のアヤメ(setosa, versicolor)の花弁・顎片の...
matplot3 <- function() {
data(iris) # is data.frame with `S...
table(iris$Species)
iS <- iris$Species == "setosa"
iV <- iris$Species == "versicolor"
op <- par(bg = "bisque")
matplot(c(1, 8), c(0, 4.5), type= "n", xlab = "Lengt...
main = "Petal and Sepal Dimensions in Iris B...
matpoints(iris[iS,c(1,3)], iris[iS,c(2,4)], pch = "s...
matpoints(iris[iV,c(1,3)], iris[iV,c(2,4)], pch = "v...
legend(1, 4, c(" Setosa Petals", " Setosa Sepa...
"Versicolor Petals", "Versicolor Sepa...
pch = "sSvV", col = rep(c(2,4), 2))
}
#ref(グラフィックス参考実例集:matplot/matplot3.png,left)
**例2。 3種類のアヤメ(setosa, versicolor,virginica)の花弁...
matplot4 <- function() {
data(iris) # is data.frame with `S...
nam.var <- colnames(iris)[-5]
nam.spec <- as.character(iris[1+50*0:2, "Species"])
iris.S <- array(NA, dim = c(50,4,3), dimnames = list...
for(i in 1:3) iris.S[,,i] <- data.matrix(iris[1:50+5...
matplot(iris.S[,"Petal.Length",], iris.S[,"Petal.Wid...
col = rainbow(3, start = .8, end = .1),
sub = paste(c("S", "C", "V"), dimnames(iris....
sep = "=", collapse= ", "),
main = "Fisher's Iris Data")
}
#ref(グラフィックス参考実例集:matplot/matplot4.png, left)
終了行:
COLOR(red){SIZE(20){グラフィックス参考実例集:matplot}}
([[グラフィックス参考実例集]]に戻る。[[Rのグラフィックス...
matplot 関数は二つの行列の対応列毎の散布図を同時に描きま...
matplotは二つの 行列x、yをとり、その各列についてプロット...
#contents
~
** 例1。2種類のアヤメ(setosa, versicolor)の花弁・顎片の...
matplot3 <- function() {
data(iris) # is data.frame with `S...
table(iris$Species)
iS <- iris$Species == "setosa"
iV <- iris$Species == "versicolor"
op <- par(bg = "bisque")
matplot(c(1, 8), c(0, 4.5), type= "n", xlab = "Lengt...
main = "Petal and Sepal Dimensions in Iris B...
matpoints(iris[iS,c(1,3)], iris[iS,c(2,4)], pch = "s...
matpoints(iris[iV,c(1,3)], iris[iV,c(2,4)], pch = "v...
legend(1, 4, c(" Setosa Petals", " Setosa Sepa...
"Versicolor Petals", "Versicolor Sepa...
pch = "sSvV", col = rep(c(2,4), 2))
}
#ref(グラフィックス参考実例集:matplot/matplot3.png,left)
**例2。 3種類のアヤメ(setosa, versicolor,virginica)の花弁...
matplot4 <- function() {
data(iris) # is data.frame with `S...
nam.var <- colnames(iris)[-5]
nam.spec <- as.character(iris[1+50*0:2, "Species"])
iris.S <- array(NA, dim = c(50,4,3), dimnames = list...
for(i in 1:3) iris.S[,,i] <- data.matrix(iris[1:50+5...
matplot(iris.S[,"Petal.Length",], iris.S[,"Petal.Wid...
col = rainbow(3, start = .8, end = .1),
sub = paste(c("S", "C", "V"), dimnames(iris....
sep = "=", collapse= ", "),
main = "Fisher's Iris Data")
}
#ref(グラフィックス参考実例集:matplot/matplot4.png, left)
ページ名: