# plot f-measure, recall and precision all in the same graph # use something like this: # # cat plot.R - | R --no-save # #pdf("fmeasure.pdf") #png("fmeasure.png") x11() # setup curve(1000+1000*x, xlim=c(0,1), ylim=c(0.0,1),xlab="Precision",ylab="Recall") # grid axis(1, tck = 1, col = "grey93", lty = "dotted") axis(2, tck = 1, col = "grey93", lty = "dotted") for(f in seq(0.1,0.9,0.1)) { curve(f*x/(2*x-f), f/2,1.1, add=TRUE, n=1000, col="lightgrey") text(1,f/(2-f), label=sprintf("f=%.1f",f), pos=1, col="grey") } # example data: d=data.frame(runif(5),runif(5)) points(d, bg=rainbow(5), col="black",pch=21:27, cex=2) #dev.off()