相关疑难解决方法(0)

R:ggplot2,我可以将绘图标题设置为环绕并缩小文本以适合绘图吗?

library(ggplot2)

my_title = "This is a really long title of a plot that I want to nicely wrap \n and fit onto the plot without having to manually add the backslash n, but at the moment it does not"

r <- ggplot(data = cars, aes(x = speed, y = dist))
r + geom_smooth() + #(left) 
opts(title = my_title)
Run Code Online (Sandbox Code Playgroud)

我可以设置绘图标题以包围并缩小文本以适应情节吗?

r title word-wrap ggplot2

26
推荐指数
3
解决办法
2万
查看次数

标签 统计

ggplot2 ×1

r ×1

title ×1

word-wrap ×1