【发布时间】:2026-01-22 11:50:01
【问题描述】:
例如:
mytheme <- trellis.par.get()
mytheme$strip.border$col = 'grey80'
mytheme$strip.background$col = 'grey80'
mytheme$axis.line$col = 'grey80'
mytheme$axis.text$col = 'grey60'
mytheme$plot.symbol$pch = 20
mytheme$plot.symbol$cex = .5
mytheme$plot.symbol$col = '#7AC5CD'
mytheme$plot.symbol$alpha = .8
l.sc <- update(scatter.lattice, par.settings = mytheme,
layout = c(3, 2),
between = list(x = 0.3, y = 0.3))
print(l.sc)
如何将par.settings 的默认值设置为mytheme?
在Lattice Multivariate Data Visualization with R一书中,第131页,作者给出了这个例子:
lattice.options(lattice.theme = standard.theme("pdf"))
但我不知道如何使其适应当前情况。我试过了:
lattice.options(lattice.theme = mytheme)
它不起作用。
【问题讨论】:
-
有一个 latticeOptions 函数,可能拼写不准确。
-
是的,它是 lattice.options,但手册页根本不清楚。
-
通过查看
lattice.options()的输出,主要与布局有关。