Creating a superscript in mtext

前端 未结 2 504
暖寄归人
暖寄归人 2020-12-19 09:08

I have the following dataframe

Data1 <- data.frame(pH = c(8,8.5,6,7.1,9), EC50 = c(20,11,5,25,50))
Data2 <- data.frame(pH = c(7,7.2,6.5,8.2,8.5), EC50          


        
2条回答
  •  我在风中等你
    2020-12-19 09:28

    You have to build your expression within the expression call. See the examples at Mathematical Annotation in R.

    In your case I found

    mtext(expression(paste( plain("Cu") ^ plain("2+"), plain(" at EC50") )), side=2, line = 4, padj=1, at=30, cex=1.2)
    

    gave a reasonable result

提交回复
热议问题