# R script to draw interpolation diagram png("c:/datasets/interp.png") plot(NULL, NULL, xlim=c(0.5, 0.9), ylim=c(40, 80), type="n") points(c(0.6, 0.67, 0.8), c(45, 55.85, 76), pch=16) lines(c(0.6, 0.8, 0.8, 0.6), c(45, 76, 45, 45)) lines(c(0.67, 0.67), c(45, 55.85), lty=2) lines(c(0.67, 0.8), c(55.85, 55.85), lty=2) text(0.6, 43.3, "p=0.6") text(0.67, 43.3, "p=0.67") text(0.8, 43.3, "p=0.8") text(0.57, 45, "x=45") text(0.83, 45, "x=45") text(0.61, 55.85, "Solve for x=55.85") text(0.83, 76, "x=76") dev.off( )