Julien Beguin <julien.beguin.1 <at> ulaval.ca> writes: > scatterplot.matrix(~ a + b + c, > groups=treatment, ... > legend.plot=T, > ) > legend("topright",c("fenced","unefenced"), fill=NULL,bty="o",cex=3) > -------------------------------------------------------------------- > > In my dataset, the variable "treatment" contains two levels that are coded "N" > and "Y" (for No and Yes) and appear in my "per default" legend that is located > in the buttomright of my 3x3 scatterplot. I would like to replace N by a list > of character: "unfenced" and Y by "fenced", as well as moving the legend in > another place in my graphic... is someone know how to do that with a > scatterplot?
In most cases it is easiest to assign new level to the factor; a = as.factor(c("N","Y","Y","N")) levels(a)=c("unfenced","fenced") levels(ar)=c("unfenced","fenced") # if you want to keep orinale legend has x,y coordinates. Dieter ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.