我正在尝试使用格子主题来设置我的所有图形参数,以保持我的绘图语句简短。我似乎找不到正确的格子参数访问刻度线长度(或任何比例参数)。
library(lattice)
x = runif(100)
my.theme = trellis.par.get()
my.theme$axis.line = list(tck=c(4)) # this does not work
dp <- densityplot(~x)
# this works, but I want to do it using a theme
# dp <-densityplot(~x, scales=list(y=list(tck=c(4))))
png("dp.png", width=400, height=200)
trellis.par.set(my.theme)
plot(dp); dev.off()