Reputation: 1797
I'm trying to increase font size in mirt
plots, however, so far I'm able to increase size of ticks only:
library(mirt)
x <- mirt(Science, 1, SE=TRUE)
plot(x)
plot(x, scales = list(cex = c(1.4)))
How can I increase size of the axis and main title? I tried to add xlab = list(cex = 1.4)
, however I'm getting an error:
Error in xyplot.formula(score ~ Theta, plt, ylim = c(sum(mins) - ybump_full, :
formal argument "xlab" matched by multiple actual arguments
**EDIT: **
Some parts can be increased with trellis.par.set()
as suggested by @user20650, however it does not include font size of legend.
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)
Moreover, this does not have impact on the following plot:
plot(x, type = "infoSE", facet_items = FALSE, scales = list(cex = 1.4),
par.strip.text = list(cex = 1.4), main = FALSE)
Upvotes: 3
Views: 385
Reputation: 25914
You can set parameters globally with trellis.par.set
or pass to the individual plot using the par.settings
parameter. trellis.par.get()
can be used to get a list of the names of the objects that can be updated.
So for example the following can be used to update specific parameters within a plot
plot(x, type = "trace",
par.settings=list(
par.xlab.text=list(cex=3, col="red"),
par.main.text=list(cex=2)))
Or to update globally use
trellis.par.set(par.xlab.text=list(cex=3, col="red"),
par.main.text=list(cex=2)
)
Using grid.pars=list(cex=3))
seems to update all text sizes
Upvotes: 1