[R] Using auto.key with two variable plots

Jonathan Greenberg greenberg at ucdavis.edu
Sat Jan 30 21:45:59 CET 2010


Rhelpers:

    Having a problem solving this.  I have an xyplot call that looks 
like this:

        
print(xyplot(temp_species_EAM_Pred_Pop$x+temp_species_NULL_Pred_Pop$x~temp_species_EAM_Pred_Pop$Action,main=current_species,
                        xlab="Action",ylab="Predicted Pop",
                        xlim=c(xmin,xmax),ylim=c(ymin,ymax),
                        auto.key=list(corner=c(1,1))))

This is just a scatterplot with two response variables sharing the same 
predictor variable (temp_species_EAM_Pred_Pop$Action).  Right now, the 
key has the words "temp_species_EAM_Pred_Pop$x" and 
"temp_species_NULL_Pred_Pop$x" next to their symbols.  I would like to 
rename these in the key, say "EAM" and "NULL" -- using the group= 
command doesn't work (since these aren't really different groups).  What 
is the right way to rename these variables in the key?  Is using 
auto.key the right approach?

Thanks!

--j

-- 

Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote Sensing (CSTARS)
University of California, Davis
One Shields Avenue
The Barn, Room 250N
Davis, CA 95616
Phone: 415-763-5476
AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307



More information about the R-help mailing list