How to have a new line in a `bquote` expression used with `text`?

后端 未结 3 797
滥情空心
滥情空心 2020-12-17 19:59

I want to have a new line in my bquote envrionment, how can I do this?

my code:

test<-c(1,2,3,4,4.5,3.5,5.6)
test2<-0.033111111
pl         


        
3条回答
  •  不知归路
    2020-12-17 20:36

    For instance, using atop:

    test<-c(1,2,3,4,4.5,3.5,5.6)
    test2<-0.033111111
    plot(test,c(1:length(test)))
    
    segments(4,0,4,23,col="red",lwd=2)
    text(5, 4.5, 
         labels = bquote(atop(Qua[0.99] == phantom(), .(round(test2,4)))),
         col="red", cex = 1.4)
    

    enter image description here

提交回复
热议问题