我正在尝试增加 ggplot 标题中下划线的大小/宽度/厚度。我曾尝试使用大小、宽度和长度,但没有成功。
这是我所做的一个例子。
test <- tibble(x = 1:5,
y = 1,
z = x ^ 2 + y)
ggplot(test, aes(x,z)) +
geom_point() +
labs(title = expression(paste(underline("Increasing"), " underline")))+
theme(plot.title = element_text(size = 20))
任何想法,将不胜感激。
最佳答案
好问题。我一开始就做对了吗?
用另一个下划线覆盖下划线。
library(ggplot2)
library(tibble)
test <- tibble(x = 1:5,
y = 1,
z = x ^ 2 + y)
ggplot(test, aes(x, z)) +
geom_point() +
labs(title = expression(paste(underline(underline("Increasing")), " underline"))) +
theme(plot.title = element_text(size = 20))
关于r - 增加 ggplot 标题中的下划线大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57344066/