col.region changes both colors in plot and colorkey. try:
x <- seq(pi/4, 5 * pi, length = 100) y <- seq(pi/4, 5 * pi, length = 100) levelplot(z~x*y) #default levelplot(z~x*y,col.regions=rainbow(24)) #custom color On 1/11/07, Bram Kuijper <[EMAIL PROTECTED]> wrote: > Hi all, > > I try to make a levelplot from the Trellis graphics package of count > data given a certain x and y variable. > > The problem is that I can adjust the colorkey colors, but the colors of > the actual values in the plot will be unchanged if I change the colorkey. > > e.g. > my_lvl_plot <- levelplot(my_z ~ my_x * my_y, colorkey = > > list(col=some_color_vector)) > > will result in a levelplot that draws new colors in the colorkey, but > still draws the default colors in the plotting space. > > anybody ideas how to change also the colors in the plotting space to the > values depicted in the color key? > > thanks, > Bram > > ______________________________________________ > R-help@stat.math.ethz.ch 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. > ______________________________________________ R-help@stat.math.ethz.ch 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.