w <- read.csv("compare_v05.csv") wl <- lm(w$WMH ~ w$WM.hypointensities) pwl <- summary(wl) postscript("wmh_comparing.ps", width=1024, height=600, bg="white") plot(w$WM.hypointensities, w$WMH, main="WMH comparison pgs VS FS", xlab="Freesurfer WMH", ylab="pgs WMH", pch=15, col="blue") abline(wl$coefficients[1],wl$coefficients[2],col="red",lwd=3) text(2500,25000, bquote(R^2 == .(round(pwl$adj.r.squared, digits=3))), cex=2) dev.off()