Re: [R] specify breaks in divergent palette in RColorBrewer: was divergent colors around zero in levelplot()

2013-11-26 Thread Barry Rowlingson
On Tue, Nov 26, 2013 at 1:02 AM, C. Alina Cansler acans...@uw.edu wrote: Don, This looks helpful: https://stat.ethz.ch/pipermail/r-help/2011-March/272361.html Yes, he's a helpful chap. The fundamental problem here is the colour palette. When I was a boy all we had was a pen plotter with

Re: [R] specify breaks in divergent palette in RColorBrewer: was divergent colors around zero in levelplot()

2013-11-26 Thread Prof Brian Ripley
On 26/11/2013 08:25, Barry Rowlingson wrote: On Tue, Nov 26, 2013 at 1:02 AM, C. Alina Cansler acans...@uw.edu wrote: Don, This looks helpful: https://stat.ethz.ch/pipermail/r-help/2011-March/272361.html Yes, he's a helpful chap. The fundamental problem here is the colour palette. When I

Re: [R] specify breaks in divergent palette in RColorBrewer: was divergent colors around zero in levelplot()

2013-11-26 Thread Barry Rowlingson
On Tue, Nov 26, 2013 at 9:58 AM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: But the image function (and probably levelplot) doesn't allow that so Mis-information alert! The help says col: a list of colors such as that generated by ‘rainbow’, ‘heat.colors’,

Re: [R] specify breaks in divergent palette in RColorBrewer: was divergent colors around zero in levelplot()

2013-11-26 Thread Don McKenzie
Thanks to everyone who weighed in on this. I found a naive solution that was good enough for my needs, and it may take me a bit to get the subtleties of your comments. On Nov 26, 2013, at 2:12 AM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Tue, Nov 26, 2013 at 9:58 AM, Prof

[R] specify breaks in divergent palette in RColorBrewer: was divergent colors around zero in levelplot()

2013-11-25 Thread Don McKenzie
Bert or anyone else familiar with RColorBrewer: Has anyone tried to accomplish with RColorBrewer what I asked about in my original post (below)? Here is an example cribbed from the levelplot() help examples x - seq(pi/4, 5 * pi, length.out = 100) y - seq(pi/4, 5 * pi, length.out = 100) r -

Re: [R] specify breaks in divergent palette in RColorBrewer: was divergent colors around zero in levelplot()

2013-11-25 Thread Don McKenzie
Never mind. Solved. “cuts” argument back in levelplot(). Duh. On Nov 25, 2013, at 4:27 PM, Don McKenzie d...@u.washington.edu wrote: Bert or anyone else familiar with RColorBrewer: Has anyone tried to accomplish with RColorBrewer what I asked about in my original post (below)? Here

Re: [R] specify breaks in divergent palette in RColorBrewer: was divergent colors around zero in levelplot()

2013-11-25 Thread Don McKenzie
In case anyone cares (?), here is a function to do what I was asking, which doesn’t use colorBrewer but could with some hacking. I’m sure it’s fragile, but it works with well behaved integers and zero in the middle, which was all I needed. The output is a palette that can be passed to

Re: [R] specify breaks in divergent palette in RColorBrewer: was divergent colors around zero in levelplot()

2013-11-25 Thread C. Alina Cansler
Don, This looks helpful: https://stat.ethz.ch/pipermail/r-help/2011-March/272361.html Also, here is some code that I had, and tried to make applicable to your question: div.colors -colorRampPalette(c(blue, white, red )) x-seq(-1,12,1);x palette(div.colors(length(x))) y- rep(1,length(x))

Re: [R] specify breaks in divergent palette in RColorBrewer: was divergent colors around zero in levelplot()

2013-11-25 Thread Achim Zeileis
On Mon, 25 Nov 2013, C. Alina Cansler wrote: Don, This looks helpful: https://stat.ethz.ch/pipermail/r-help/2011-March/272361.html Also, here is some code that I had, and tried to make applicable to your question: div.colors -colorRampPalette(c(blue, white, red )) x-seq(-1,12,1);x