[英]How to change the font size in the second main title line of a plot
除了这个问题( 如何将图的主标题分成两行或更多行? ),我还尝试为第二个主标题行赋予另一个字体大小。 cex.main=1
仅cex.main=1
整个主标题。
所以我还没有找到任何可行的方法……
有没有人暗示?
提前谢谢了!
我的代码:
plot(1, main=paste("X:",1," ","Y:", 2," ","\nZ:",3)) # the “Z: 3” should get a smaller font size
添加第二个主标题和增加字体大小的替代方法是将title()
与plot()
。 使用title()
您还可以添加和操纵“第二个标题”的位置以及字体类型。
因此,代码如下所示:
plot(1, main = paste("X:",1," ","Y:", 2," "))
# In order to change font size use cex.main and in order to manipulate
# the position of second title use line()
title(main = ("Z: 3"), line = 0.5, cex.main = 0.8)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.