R scatterplot and created the three curve line and I wanted values which are coverd by the outer two lines
suggest me how I can get the values which are between the two outer red line is
data used test data
code used
library("PerformanceAnalytics") df=read.table("test",sep='\t', header=TRUE) pdf('test.pdf',width=6,height=6) smoothScatter(df$level2,df$level1,main = "data",xlab='level2',ylab='level1',nrpoints=Inf,xlim=c(0,1),ylim=c(0,1),pch=20,cex=0.5) points(c(0,1),c(1,0),type='l',col='green',lty=2,lwd=2) points(((1-p)^2)+0.03,(p^2)+0.03,type='l',col='red',lty=2,lwd=2) points(((1-p)^2)-0.03,(p^2)-0.03,type='l',col='red',lty=2,lwd=2) p=0:1000/1000 points((1-p)^2,p^2,type='l',col='red',lty=2,lwd=2) legend(0.30, 1, c("Co", "data_observe"), col = c("green", "red"), bg = "#FFFFFFAA", lty = 2, lwd = 4, box.col = "#FFFFFF00") dev.off() Thank you
https://stackoverflow.com/questions/66829912/r-scatter-plot-get-values-under-the-curve March 27, 2021 at 05:43PM
没有评论:
发表评论