[R] Detailed legend in mathplot ...

Petar Milin pmilin at ff.ns.ac.yu
Wed Mar 21 08:38:25 CET 2007


Hello,
Recently, I have asked for a help with building graphs, and I got few
great advices. Now, my appetite is growing :) and I wander how to add
legend for two (or more) lines in following example:

matplot(DAT[, c(3,4)], type="b", ylim=c(0,8), xaxt="n", yaxt="n",
 + pch=c(21,22), col="black", lty=c("dashed","solid"), xlab="", ylab="")
title(ylab="% correct", xlab="Trial", cex.lab=1.5)
axis(1, at=1:4, labels=as.character(DAT$Trial), cex.axis=1.5)
axis(2, cex.axis=1.5)


Sincerely,
Petar



More information about the R-help mailing list