mirt 图中的字体大小

Font size in mirt plots

我正在尝试增加 mirt 图中的字体大小,但是,到目前为止,我只能增加刻度的大小:

library(mirt)
x <- mirt(Science, 1, SE=TRUE)
plot(x)

plot(x, scales = list(cex = c(1.4)))

如何增加轴和主标题的大小?我尝试添加 xlab = list(cex = 1.4),但出现错误:

Error in xyplot.formula(score ~ Theta, plt, ylim = c(sum(mins) - ybump_full,  : 
  formal argument "xlab" matched by multiple actual arguments

**编辑:** 根据@user20650 的建议,某些部分可以用 trellis.par.set() 增加,但是它不包括图例的字体大小。

trellis.par.set(par.xlab.text = list(cex = 1.4), par.ylab.text = list(cex = 1.4))
plot(x, type = "trace", facet_items = FALSE, scales = list(cex = 1.4), 
     par.strip.text = list(cex = 1.4), main = FALSE)

另外,这对后面的剧情没有影响:

plot(x, type = "infoSE", facet_items = FALSE, scales = list(cex = 1.4), 
     par.strip.text = list(cex = 1.4), main = FALSE)

您可以使用 trellis.par.set 全局设置参数或使用 par.settings 参数传递给单个地块。 trellis.par.get() 可用于获取可更新对象的名称列表。

因此,例如以下内容可用于更新绘图中的特定参数

plot(x, type = "trace", 
     par.settings=list(
       par.xlab.text=list(cex=3, col="red"),
       par.main.text=list(cex=2)))

或全局更新使用

trellis.par.set(par.xlab.text=list(cex=3, col="red"),
                par.main.text=list(cex=2)
                )

使用 grid.pars=list(cex=3)) 似乎更新了所有文本大小