New grDevices::hcl.colors()

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

New grDevices::hcl.colors()

Achim Zeileis-4
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-palettes-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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: New grDevices::hcl.colors()

David Hugh-Jones-3
Hi Achim

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

David

On Tue, 2 Apr 2019 at 00:38, Achim Zeileis <[hidden email]> 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-palettes-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
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Sent from Gmail Mobile

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: New grDevices::hcl.colors()

Achim Zeileis-4
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 <[hidden email]> 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
>
>       ______________________________________________
>       [hidden email] mailing list
>       https://stat.ethz.ch/mailman/listinfo/r-devel
>
> --
> Sent from Gmail Mobile
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: New grDevices::hcl.colors()

Abby Spurdle
In reply to this post by Achim Zeileis-4
Hi Z

I think supporting HCL color spaces more, is a *very* good idea.
However, I doubt many R users, understand the motivation for HCL color
spaces.

I've reproduced Ross Ihaka's notes on color, on my personal website:
https://sites.google.com/site/spurdlea/exts/ihaka_r_stats_787_10_color.pdf

(This has been reproduced with permission).

Another good article is:
https://www.r-project.org/conferences/DSC-2003/Proceedings/Ihaka.pdf

And the colorspace package vignette is also a good resource:
https://cran.r-project.org/web/packages/colorspace/vignettes/hcl-colors.pdf

These are good resources for people interested in mathematical or
statistical graphics.


Abs

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: New grDevices::hcl.colors()

Abby Spurdle
Oops.
I didn't notice that you have references on your blog.
The more references the better, I guess.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: New grDevices::hcl.colors()

Achim Zeileis-4
In reply to this post by Abby Spurdle
Abs,

thanks for the feedback. As you noticed meanwhile we had linked Ross's
2003 paper as well as a few other references. The slides from Ross are a
useful addition, I didn't know these (only parts of them).

Also we didn't want to list all of the references in the blog post but
linked to the colorspace web page and manuscript - both of which have much
more references.

Best,
Z


On Tue, 2 Apr 2019, Abs Spurdle wrote:

> Hi Z
> I think supporting HCL color spaces more, is a *very* good idea.
> However, I doubt many R users, understand the motivation for HCL color
> spaces.
>
> I've reproduced Ross Ihaka's notes on color, on my personal website:
> https://sites.google.com/site/spurdlea/exts/ihaka_r_stats_787_10_color.pdf
>
> (This has been reproduced with permission).
>
> Another good article is:
> https://www.r-project.org/conferences/DSC-2003/Proceedings/Ihaka.pdf
>
> And the colorspace package vignette is also a good resource:
> https://cran.r-project.org/web/packages/colorspace/vignettes/hcl-colors.pdf
>
>
> These are good resources for people interested in mathematical or
> statistical graphics.
>
>
> Abs
>
>
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel