Re: [Rd] Colour Schemes

2009-05-21 Thread Deepayan Sarkar
On Thu, May 21, 2009 at 10:53 AM, Barry Rowlingson wrote: > On Thu, May 21, 2009 at 5:29 PM, Deepayan Sarkar > wrote: > > [oops I didnt reply-to-all] > >> But you could specify an explicit 'at' vector specifying the color >> breakpoints: effectively, you want at = do.breaks(zlim, 5). >> >> lattic

Re: [Rd] Colour Schemes

2009-05-21 Thread hadley wickham
>  Yes, but these things are all at the wrong conceptual level. What you > are constructing here is a function that maps value to colour, but > keeping it as breaks and cut values and colours instead of > representing it as a function. Wouldn't it be nicer to build a real > function object and have

Re: [Rd] Colour Schemes

2009-05-21 Thread Barry Rowlingson
On Thu, May 21, 2009 at 5:29 PM, Deepayan Sarkar wrote: [oops I didnt reply-to-all] > But you could specify an explicit 'at' vector specifying the color > breakpoints: effectively, you want at = do.breaks(zlim, 5). > > lattice does have a function called 'level.colors' that factors out > the col

Re: [Rd] Colour Schemes

2009-05-21 Thread Deepayan Sarkar
On 5/21/09, Barry Rowlingson wrote: > On Thu, May 21, 2009 at 2:18 PM, wrote: > > > Most of the plots where colour is typically used to signify a variable > > already do map colours to data values. Take a look at help pages for > > levelplot/contourplot/wireframe from the lattice package, an

Re: [Rd] Colour Schemes

2009-05-21 Thread Richard . Cotton
I'm going to take your second example first. > The base graphics "image" function has zlim arguments which let you do: > > z=outer(1:10,1:10,"*") > image(z) > image(z/2, zlim=range(z)) > > but again, not obvious, and complex/impossible when using more > sophisticated colour mappings. The w

Re: [Rd] Colour Schemes

2009-05-21 Thread Barry Rowlingson
On Thu, May 21, 2009 at 2:18 PM, wrote: > Most of the plots where colour is typically used to signify a variable > already do map colours to data values.  Take a look at help pages for > levelplot/contourplot/wireframe from the lattice package, and image from > base graphics. > > (The format is

Re: [Rd] Colour Schemes

2009-05-21 Thread Richard . Cotton
> I've been thinking hard about generating colour schemes for data. > There's quite a bit of existing code scattered in various packages for > playing with colours and colour palettes, but I can't find the sort of > thing I'm after for applying colours to data... > > To my mind a colour scheme is