【发布时间】:2020-11-12 06:46:15
【问题描述】:
我无法获得任何解决方案来包装主情节标题以使用包含一些粗体和斜体字的标题。在其他几个什么都不做的解决方案中,我尝试了 stringr 并手动创建换行符,但 stringr 包含“粗体”等文本,手动换行符要么不产生任何效果,要么产生非常奇怪的中断 strange manual break(我已经在几个地方试过了,看看有没有效果)。
对不起,笨拙的代码-我是一名生物学研究生,对 R 很陌生。
mainplotlabel4 <- c(expression(paste(bold("Figure 5"), italic(" Species with long name"), " Long fake name virginica response all things"), italic(" Shorter species"), " Sepal Length Only Purple Long Fake Name"))
setosa.sepal.dotplot <- ggerrorplot(data = iris, x = "Species", y= "Sepal.Length", add = "jitter", error.plot = "linerange", add.params = list(color="darkolivegreen2", size=1.5), xlab = 'Treatment', ylab = "Sepal Length", main = mainplotlabel4, ylim = c(0, 10), width=1, ggtheme = theme_dark())
setosa.sepal.dotplot + rotate_x_text(45)
【问题讨论】:
-
请包含您正在使用的所有软件包。
ggerrorplot不是 ggplot 的基本函数