Hi,
The maPalette() function (in the marray package) does not always
return the number of colors requested. More specifically, if a middle
color is given and the number of colors requested is odd, then
maPalette returns either one more or one less than the requested
number of colors:
# >>> returns 12 colors <<<
maPalette(low="white", high="red", mid="yellow", k=11)
# returns 11 colors
maPalette(low="white", high="red", k=11)
# >>> returns 12 colors <<<
maPalette(low="white", high="red", mid="yellow", k=13)
# returns 13 colors
maPalette(low="white", high="red", k=13)
Is this a feature or a bug? I'm using R version 2.10.1.
Cheers,
/Ali