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
> 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
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
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
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
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
> 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