[R] getting 21 very different colours

S Ellison S@E|||@on @end|ng |rom LGCGroup@com
Tue Sep 11 12:08:25 CEST 2018


You could look at combning a number of palettes from the RColorBrewer package to get the palette length you want.

S Ellison

> -----Original Message-----
> From: R-help [mailto:r-help-bounces using r-project.org] On Behalf Of Federico
> Calboli
> Sent: 11 September 2018 08:35
> To: r-help using r-project.org
> Subject: [R] getting 21 very different colours
> 
> Hi All,
> 
> I am plotting a scatterplot of 21 populations, and I am using
> rainbow(21)[pops.col] to generate 21 colours for the plot (which works).
> Maybe it is because I can really process few colours at a time, but the
> differences between the colours are not as strong as I’d like.  I can specify
> start and end for rainbow(), but if anything that looks worse if I do not just
> stick to 0 and 1.
> 
> Is there a way of getting a set of 21 colours that maximises the differences
> between them?
> 
> I could pick them by hand, but that is about 15 colours more than I know (I
> have a detailed colourchart, but the visual differences between ’skyblue’ and
> ’slategrey’ elude me when plotted as dots on a plot).
> 
> Cheers
> 
> F
> --
> Federico Calboli
> LBEG - Laboratory of Biodiversity and Evolutionary Genomics
> Charles Deberiotstraat 32 box 2439
> 3000 Leuven
> +32 16 32 87 67
> 
> 
> 
> 
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.


*******************************************************************
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If 
you have received this message in error, please notify the sender 
immediately via +44(0)20 8943 7000 or notify postmaster using lgcgroup.com 
and delete this message and any copies from your computer and network. 
LGC Limited. Registered in England 2991879. 
Registered office: Queens Road, Teddington, Middlesex, TW11 0LY, UK


More information about the R-help mailing list