ラティス bwplot のヘルプが必要です。マルチパネル プロットを作成し、それらを同じウィンドウに配置しました。
library(lattice)
attach(mtcars)
gear.f<-factor(gear,levels=c(3,4,5), labels=c("3gears","4gears","5gears"))
cyl.f <-factor(cyl,levels=c(4,6,8), labels=c("4cyl","6cyl","8cyl"))
plot1 <- bwplot(cyl.f~mpg|gear.f, ylab="Cylinders", xlab="Miles per Gallon", main="Mileage by Cylinders and Gears", layout=(c(1,3)))
plot2 <- xyplot(mpg~wt|cyl.f*gear.f, main="Scatterplots by Cylinders and Gears", ylab="Miles per Gallon", xlab="Car Weight")
print(plot1, position=c(0, 0.5, 1, 1), more=TRUE)
print(plot2, position=c(0, 0, 1, 0.5))
私がやりたいことは、各プロットのプロット マージンの外側に同じテキストを含めることです。最初のプロットには文字 A、2 番目のプロットには B を含めて、レポートでこのプロットを思い出すのに役立ちます (たとえば、図 1A と図 1)。
誰かが有用な提案を持っていますか?