簡體   English   中英

為條形圖標題添加下標

[英]Add subscript to bar chart title

我想在我的條形圖標題中添加數字“6”——“PSII 單體,Cyt b6f”。 我一直在嘗試使用expressionbquote類的函數,但似乎沒有用。 有人開導我嗎?

ggplot(data=summary_Lane3, mapping = aes(x = factor(time), y = rd, fill= gc))+
  geom_bar(stat = "identity", position = "dodge")+
  labs(title=expression("PSII monomer, Cyt b[6]f"),x= "Time (hr)",  y="Relative density", fill= "Growth conditions")+
  ylim(0,2.1)+
  geom_errorbar(aes(ymin=rd-se, ymax=rd+se), width=.5, position=position_dodge(width= 0.9))+
  stat_compare_means(data=Lane3, label="p.signif", label.y= 1.85, method="anova")+
  theme_bw()+
  theme(text = element_text(size = 15))

所以,用這個代替上面提到的(歸功於rawr),

labs(title=expression(paste("PSII monomer, Cyt ", b[6], "f")),x= "Time (hr)",  y="Relative density", fill= "Growth conditions")

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM