我想創建一個情節標題手動格式上兩行包括2斜體字,我已經做了一些searching 對堆棧Exchange,但還沒有找到了一個很好的解決方案,看似簡單的問題。多行標題與多個斜體字
這兩個物種的科學名稱相當長,因此需要多行標題(ggplot2不會格式化)。
目的:
..........第一行標題與種
第二行字anotherItalicSpecies末
ggplot(mtcars,aes(x=wt,y=mpg))+
geom_point()+
labs(title= expression(paste(atop("First line of title with ", atop((italic("Species")))),"
secondline words", italic("anotherSpecies"), "the end")))
其中產生以下損壞標題:
不錯,我只是想從發展版本中包括這些改進在我的答案;-) – Jaap
哈哈:-)(加上加上)。無論如何,顯然ggplot上週更新了,沒有注意到: - /。很好有兩個選擇。 – Jaap
已升級,很好的解決方案!但現在我收到geom_ribbon中y-aesthetic的錯誤...似乎與ggplot 2.2.0相關。我會做一些搜索,但你有什麼想法嗎? – Arch