我有以下代码,它创建一个直方图:
inst <- data.frame(c(10:27),c(76,97,128,135,137,141,110,94,67,44,39,26,19,12,7,5,2,1))
names(inst) <- c("instSize","noOfInst")
library(lattice)
trellis.par.set(theme = col.whitebg())
myplot <- xyplot(noOfInst ~ instSize, data = inst,
type = c("h", "g"), col = "blue",
xlab = "Instance Size (Number of Aircraft)",
ylab = "Number Of Instances",
scales=list(
y=list(
at=seq(0,150,10),
labels=seq(0,150,10) ),
x=list(
at=seq(10,27,1),
labels=seq(10,27,1) )
)
)
我想为 y 轴上的每个刻度添加网格线并删除所有垂直网格线。那可能吗?
谢谢