Re: [R] levelplot not adjusting colors

From: talepanda <talepanda_at_gmail.com>
Date: Fri 12 Jan 2007 - 08:14:32 GMT

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 <a.l.w.kuijper@rug.nl> 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. Received on Fri Jan 12 19:19:40 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 12 Jan 2007 - 09:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.