R画图标题换行

2013/10/24

Categories: R Tags: plot 画图

在画图是有label; main等字符串太长,或者为美观的需要进行分行。只需在分行的位置添加换行符\n

plot(3, 3, type = "n", main = "五角星\nI LOVE R \n R is GREAT")
points(3, 3, pch = "☆", cex = 2, col = "blue")

效果

Rplot