[[Rの備忘録]] [[Lattice:http://www.springer.com/statistics/computational/book/978-0-387-75968-5]] 翻訳メモ - テキスト p.41 コードをそのまま実行すると次のグラフが作成される. #ref(lattice43.png); data(Chem97, package = "mlmRev") qqmath(~ gcsescore | gender, Chem97, groups = score, aspect = "xy", f.value = ppoints(100), auto.key = list(space = "right") , xlab = "Standard Normal Quantiles", ylab = "Average GCSE Score") しかし,掲載されているのは次のような図(ただし白黒) #ref(lattice43T.png); pch.col <- sort(unique(Chem97$score)) + 1 key.list <- list( space = "right", text = list(as.character(pch.col-1) ) , points = list(pch = pch.col, col = 1:6 ) ) qqmath(~ gcsescore | gender, Chem97, groups = score, aspect = "xy", f.value = ppoints(100), pch = pch.col , col = 1:6, key = key.list, xlab = "Standard Normal Quantiles", ylab = "Average GCSE Score")