xyplot添加数据框线#以上点

时间:2018-05-26 05:57:17

标签: r point labels lattice

我已经搜索过高低帮助,并且一般都很困惑,如果情节已经在r studio中执行,我们会提出以下内容。

p<-xyplot(A~B
           ,data=X
           ,group=diffStr
           ,par.settings=myPars
           ,auto.key=list(title="xxxx", space="top", cex=myCex))


    trellis.focus("panel",1,1)
    panel.text(x=p$panel.args[[1]]$x,y=p$panel.args[[1]]$y,labels = seq.int(nrow(X)), pos=3, cex=0.7, col="red")
    trellis.unfocus()

这适用于r studio,但前提是我已经预先运行了xyplot而没有保存到p中,但是当我在knitr中运行它会中断。我只想让我的100点在其上方的数据框中具有数字位置。

感谢

0 个答案:

没有答案