


a<-as.matrix(read.table("NN_Lognormal_Independent.txt"))
b<-read.table("T2Lognormal_NN.txt")
c<-read.table("Lognormal_HD_NN.txt")
d<-read.table("Lognormal_MhD_NN.txt")

h=seq(0, 3, length.out=20)




pdf(file="Lognormal_NN.pdf")

scatter.smooth(h[-1], a[,2][-1], type='n', ylim=c(0, 0.9), col=1, xlab="Local Separation", ylab="Power", main="Lognormal in d=10")
points(loess.smooth(h[-1], a[,3][-1]), type='l', col=2)
#points(loess.smooth(h[-1], a[,5][-1]), type='l', col=3)
points(loess.smooth(h[-1], a[,6][-1]), type='l', col=3)
points(loess.smooth(h[-1], a[,7][-1]), type='l', col=4)
points(loess.smooth(h[-1], a[,8][-1]), type='l', col=5) 
points(loess.smooth(h[-1], b[,1][-1]), type='l', col=6)
points(loess.smooth(h[-1], c[,1][-1]), type='l', col=7)
points(loess.smooth(h[-1], d[,1][-1]), type='l', col=8)

abline(h=0.05, col=9)
legend("topleft", c("5NN", "20NN", "100NN", "600NN", "900NN", "T2", "HD", "MD"), col=c(1,2,3,4,5,6,7,8),
       lty = c(1,1,1,1,1,1,1,1), bg = 'gray90',text.width = strwidth("1,000,000"))


dev.off()



######################################################



a<-as.matrix(read.table("NN_Lognormal_Dependent.txt"))
b<-read.table("T2LognormalDependent_NN.txt")
c<-read.table("Lognormal_HDDependent_NN.txt")
d<-read.table("Lognormal_MhDDependent_NN.txt")

h=seq(0, 3, length.out=20)




pdf(file="Lognormal_Dependent_NN.pdf")

scatter.smooth(h[-1], a[,2][-1], type='n', ylim=c(0, 0.4), col=1, xlab="Local Separation", ylab="Power", main="Dependent Lognormal in d=10")
points(loess.smooth(h[-1], a[,3][-1]), type='l', col=2)
#points(loess.smooth(h[-1], a[,5][-1]), type='l', col=3)
points(loess.smooth(h[-1], a[,6][-1]), type='l', col=3)
points(loess.smooth(h[-1], a[,7][-1]), type='l', col=4)
points(loess.smooth(h[-1], a[,8][-1]), type='l', col=5) 
points(loess.smooth(h[-1], b[,1][-1]), type='l', col=6)
points(loess.smooth(h[-1], c[,1][-1]), type='l', col=7)
points(loess.smooth(h[-1], d[,1][-1]), type='l', col=8)

abline(h=0.05, col=9)
legend("topleft", c("5NN", "20NN", "100NN", "600NN", "900NN", "T2", "HD", "MD"), col=c(1,2,3,4,5,6,7,8),
       lty = c(1,1,1,1,1,1,1,1), bg = 'gray90',text.width = strwidth("1,000,000"))


dev.off()

