[R] xyplot background color

Nathan Vandergrift vanderg at mail.fpg.unc.edu
Fri Sep 1 16:27:00 CEST 2006


I've been unable to solve this problem using all sorts of variants of 
trellis.par.set, or par.settings within xyplot.

I need this plot not to be transparent, so when I drop the .ps into 
LaTeX it shows up on my black slides.

thanks.
nathan


traj.female<-read.delim("d:\TRAfemales.dat", header = TRUE, sep = "\t")

#This is the key to getting the right legend
trellis.par.set(superpose.line=list(lty=c(1,2,1,2,1,2),col=c(1,1,2,2,3,3)))
trellis.par.set(background=list("gray"))


# This works
female.traj<-xyplot(TRA~Grade, data=traj.female, groups=Group,
            type="l", lwd=2,
            lty=c(1,2,1,2,1,2),
            col=c(1,1,2,2,3,3),
            auto.key = list(
                lines=TRUE,
                points= FALSE,
                x = .25, y = .7, corner = c(0, 0), border=TRUE),
            xlab="Grade", ylab="TRA",
            ylim=c(-.5,6.5),xlim=c(0.5,6.5),
            panel=panel.superpose,
            #par.settings=list(background="white",transparent=FALSE)
        )
female.traj



More information about the R-help mailing list