Boxplot标签字体不能设置为粗体

时间:2018-03-08 12:29:29

标签: r plot

我正在制作不同类型的图(散点图和框)并尝试调整标签的字体。使用箱形图,font.lab=2参数不会改变任何内容。为什么呢?

example= matrix(c(1,2,7,4,1,5,5,2,4,5), ncol=2)    
op = par(mai = c(1.7,1.6,0.7,0.7), mgp = c(5.5, 1.5, 0))
b = boxplot(example, names = c("1", "2"), cex.names=2.1, cex.axis=2.1, cex.lab=2.3, font.lab=2, ylab= "Percent")
par(op)

1 个答案:

答案 0 :(得分:1)

font.lab移至par

的来电
example= matrix(c(1,2,7,4,1,5,5,2,4,5), ncol=2)    
op = par(mai = c(1.7,1.6,0.7,0.7), mgp = c(5.5, 1.5, 0), font.lab = 2)
b = boxplot(example, names = c("1", "2"), cex.names=2.1, cex.axis=2.1, 
cex.lab=2.3, ylab= "Percent")
par(op)