On Thu, May 21, 2009 at 5:29 PM, Deepayan Sarkar <deepayan.sar...@gmail.com> 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 color assignment computation. > 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 that to pass around? ggplot uses a different approach, for example in ?scale_fill_gradient, but ggplot uses "+" to add the layer objects together to create a plot. Nice. ggplot does things pretty well. Perhaps if we scrap all the other graphics systems.... :) Barry ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel