3.1 plotによるグラフ

サンプルコード

data(Cars93, package="MASS")
attach(Cars93)

plot(AirBags) # 図3.1

plot(MPG.city) # 図3.2

plot(Cylinders,AirBags) # 図3.3

plot(Horsepower,MPG.city) # 図3.4

plot(AirBags,MPG.city) # 図3.5

plot(MPG.city,AirBags) # 図3.6

plot(MPG.city,AirBags,Horsepower) # エラーが出ます
plot(Cars93[,c(7,9,13)]) # 図3.7
plot(data.frame(MPG.city,AirBags,Horsepower)) #上のコマンドと同じ

plot(MPG.city~Horsepower) # 図3.4と同じ
plot(MPG.city~AirBags) # 図3.5と同じ
plot(AirBags~MPG.city) # 図3.8


  • 最終更新:2013-05-23 19:30:18

このWIKIを編集するにはパスワード入力が必要です

認証パスワード