Skip to content
Prev 333686 / 398506 Next

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

On Tue, Nov 26, 2013 at 9:58 AM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:

            
Yes image allows you to specify col=, but it always specifies a
palette. The matrix values are scaled from 1:length(col) and looked up
in that palette. You can't call image with z as matrix of colours and
get those colours, nor set col to a matrix of colours and a see those
colours laid out. This is unlike points() where specifying col= as a
vector of the same length as the number of points gives you a 1:1
mapping of points to colours.

 To do image() with a 1:1 mapping of cell values to colours requires a
tiny bit of hoop-jumping.

Barry