是否可以添加删除线给一些geom_text
/geom_text_repel
标签?
这个问题提到您可以使用以下命令将标签变为斜体:
library("ggplot2")
library("ggrepel")
df <- data.frame(
x = c(1,2),
y = c(2,4),
lab = c("italic('Italic Text')", "Normal"))
ggplot(df, aes(x, y, label = lab)) +
geom_point() +
geom_text_repel(parse = T)
但是,我一直无法使用相同的方法来获取删除线文本。
df$lab = c("strike('Strikethrough Text')", "Normal")
ggplot(df, aes(x, y, label = lab)) +
geom_point() +
geom_text_repel(parse = T)