いくつかのレベルプロットのトレリスを生成しようとしています。今、私は2つの問題を抱えています。ここにいくつかのサンプルデータがあります
library(lattice)
require(stats)
attach(environmental)
ozo.m <- loess((ozone^(1/3)) ~ wind * temperature * radiation,
parametric = c("radiation", "wind"), span = 1, degree = 2)
w.marginal <- seq(min(wind), max(wind), length.out = 50)
t.marginal <- seq(min(temperature), max(temperature), length.out = 50)
r.marginal <- seq(min(radiation), max(radiation), length.out = 4)
wtr.marginal <- list(wind = w.marginal, temperature = t.marginal,
radiation = r.marginal)
grid <- expand.grid(wtr.marginal)
grid[, "fit"] <- c(predict(ozo.m, grid))
levelplot(fit ~ wind * temperature | radiation, data = grid,
cuts = 10, region = TRUE,
xlab = "Wind Speed (mph)",
ylab = "Temperature (F)",
main = "Cube Root Ozone (cube root ppb)")
これにより、次のプロットが生成されます。
1) すべてのプロットのタイトルを放射線ではなく、放射線の値 (例: 7,334,...) にしたい
2) 現在の数値ではなく、x 軸と y 軸の目盛りを文字に変更したい。(5-10-15-20 の代わりに EJOT が必要です)
正しい方向に(もう一度)私を向けることができますか?