x <- c(0,0,0,0,100)
y <- c(0,100,200,300,300)
h <- 300
w <- 100
grid.step <- 100
plot( c(0,w), c(0,h),
xaxs = "i",yaxs = "i",
xaxt = 'n', yaxt = 'n',
type = "n",
xlab = "Negatives", ylab = "Positives")
axis(2,y,labels=c('','p1','p2','p3',''))
axis(1,x,labels=c('','','','','n1'))
gx <- grid.step
while (gx <= w) {
abline(v = gx, col="gray", lty="dotted")
gx <- gx + grid.step
}
gy <- grid.step
while (gy <= h) {
abline(h = gy, col="gray", lty="dotted")
gy <- gy + grid.step
}
text( x[2]+10, y[2], "A")
text( x[3]+10, y[3], "B")
text( x[4]+10, y[4]-10, "C,D")
text( x[5]-10, y[5]-10, "E,F")
lines( x, y, lwd=5, type='o')