maPalette() and the number of colors returned (bug?)
0
0
Entering edit mode
Ali Tofigh ▴ 30
@ali-tofigh-4123
Last seen 9.6 years ago
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
marray marray • 870 views
ADD COMMENT

Login before adding your answer.

Traffic: 1059 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6