r语言 - 从格子包在 qqmath 中设置图形属性?



谁能告诉我如何在lattice包的qqmath中设置属性。具体来说,如何增加轴标题,轴文本等的字体大小?原生plot论点似乎都不起作用。

library(lattice)
lattice::qqmath(~ rnorm(100), distribution = function(p) qt(p, df = 10),
id=0.05,
main = "this is a title",
ylab = "this is a y-axis",
xlab = "this is an x-axis",
cex = 2,
cex.axis = 4,
font = 2,
cex.lab = 4)

在迷宫中找到了一个解决方案,即lattice的帮助页面。为了在格图中指定轴标签的属性,您需要在scales参数中使用xy参数,所有这些都包含在list()中。要更改标题的字体大小,您还需要将所有内容包装在list()中:

lattice::qqmath(~ rnorm(100), distribution = function(p) qt(p, df = 10),
id=0.05,
main = list("this is a title", cex = 2),
ylab = list("this is a y-axis", cex = 3),
xlab = list("this is an x-axis", cex = 4),
scales = list(x = list(cex = 4)))

最新更新