【发布时间】:2014-09-01 15:49:04
【问题描述】:
我需要关于 lattice 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 和第二个情节的字母 B 有助于在我的报告中回忆这个情节(例如图 1A 和图 1)。 1).
有人有有用的建议吗?
【问题讨论】: