[Rd] New grDevices::hcl.colors()

Achim Zeileis Ach|m@Ze||e|@ @end|ng |rom u|bk@@c@@t
Tue Apr 2 10:12:43 CEST 2019


Hi David:

> Quick Q: why do some palettes have a hyphen in the name and others not?

I followed the naming conventions of the respective packages that provide 
the original for the the HCL-based approximations. But when you specify 
the palette name in hcl.colors() all hyphens, spaces, and the 
capitalization is ignored anyway:

R> hcl.colors(4, "Dark 3")
[1] "#E16A86" "#909800" "#00AD9A" "#9183E6"
R> hcl.colors(4, "dark3")
[1] "#E16A86" "#909800" "#00AD9A" "#9183E6"
R> hcl.colors(4, "Dark-3")
[1] "#E16A86" "#909800" "#00AD9A" "#9183E6"
R> hcl.colors(4, "Dark----------------3")
[1] "#E16A86" "#909800" "#00AD9A" "#9183E6"

So hopefully this does not lead to too much confusion.

Best wishes,
Z

> On Tue, 2 Apr 2019 at 00:38, Achim Zeileis <Achim.Zeileis using uibk.ac.at> wrote:
>       Hi everyone,
>
>       I wanted to draw your attention to a new post on the
>       developer.R-project.org blog:
> https://developer.R-project.org/Blog/public/2019/04/01/hcl-based-color-pale
>       ttes-in-grdevices/
>
>       A new function grDevices::hcl.colors() greatly extends the color
>       palette
>       functionality available in base R. Also, the defaults in the
>       heatmap
>       functions image() and filled.contour() have been adapted
>       accordingly.
>
>       Feedback is welcome, especially regarding potential problems
>       with the
>       changed defaults.
>
>       Best wishes,
>       Z
>
>       ______________________________________________
>       R-devel using r-project.org mailing list
>       https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> --
> Sent from Gmail Mobile
> 
>



More information about the R-devel mailing list