我在 pscl 包中运行总统选举的 xyplot 并得到了错误
data(presidentialElections)
library(lattice)
xyplot(demVote ~ year | state,
panel=panel.lines,
ylab="Democratic Vote for President (percent)",
xlab="Year",
data=presidentialElections,
scales=list(y=list(cex=.6),x=list(cex=.35)),
strip=strip.custom(par.strip.text=list(cex=.6)))
Error:
Error in recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) :
invalid graphics state
我是 R 的新用户,如果有人可以帮助我解决错误,我将不胜感激。