[GRASS-dev] [GRASS GIS] #3371: Perceptual color tables

#3371: Perceptual color tables
--------------------------------+-------------------------
Reporter: baharmon | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Default | Version: svn-trunk
Keywords: r.colors, v.colors | CPU: Unspecified
Platform: Unspecified |
--------------------------------+-------------------------
Add more perceptual color tables like viridis to GRASS. The other
perceptual color tables - magma, plasma, and inferno - created by Stéfan
van der Walt and Nathaniel Smith for matplotlib would a useful addition.

Furthermore, the r.cpt2grass addon could be integrated into r.colors as an
option for importing colors rules from the web.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371&gt;
GRASS GIS <https://grass.osgeo.org>

#3371: Perceptual color tables
--------------------------+--------------------------------
  Reporter: baharmon | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.4
Component: Default | Version: svn-trunk
Resolution: | Keywords: r.colors, v.colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+--------------------------------
Changes (by pierreroudier):

* Attachment "inferno" added.

"inferno" colour ramp

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371&gt;
GRASS GIS <https://grass.osgeo.org>

#3371: Perceptual color tables
--------------------------+--------------------------------
  Reporter: baharmon | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.4
Component: Default | Version: svn-trunk
Resolution: | Keywords: r.colors, v.colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+--------------------------------
Changes (by pierreroudier):

* Attachment "magma" added.

"magma" colour ramp

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371&gt;
GRASS GIS <https://grass.osgeo.org>

#3371: Perceptual color tables
--------------------------+--------------------------------
  Reporter: baharmon | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.4
Component: Default | Version: svn-trunk
Resolution: | Keywords: r.colors, v.colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+--------------------------------
Changes (by pierreroudier):

* Attachment "plasma" added.

"plasma" colour ramp

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371&gt;
GRASS GIS <https://grass.osgeo.org>

#3371: Perceptual color tables
--------------------------+--------------------------------
  Reporter: baharmon | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.4
Component: Default | Version: svn-trunk
Resolution: | Keywords: r.colors, v.colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+--------------------------------

Comment (by pierreroudier):

Agree with the OP, more of these excellent palettes would be great,

I've attached the "inferno", "magma", and "plasma" colour ramps, which can
be copied into $GISBASE/etc/colors/

I guess I'd be interested to know if they would be best added to trunk, or
moved into a dedicated add-on (I strongly advocate for the first option,
since using perceptually uniform palettes is good GIS practice).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3371: Perceptual color tables
--------------------------+--------------------------------
  Reporter: baharmon | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.4
Component: Default | Version: svn-trunk
Resolution: | Keywords: r.colors, v.colors
       CPU: Unspecified | Platform: Unspecified
--------------------------+--------------------------------

Comment (by wenzeslaus):

Make sense to me. The main reason I did not include these with viridis was
that they are so similar to each other (yet different enough to just pick
one). Any opinion about that?

For the inclusion into do the source code, please provide a comment
similar to what we have for viridis:
source:grass/trunk/lib/gis/colors/viridis

Note also that the `grass` color table is also perceptually uniform
(comment:27:ticket:3043).

Finally, if you have further ideas about color tables in GRASS GIS,
consider looking into what can be done for [wiki:Grass8Planning version 8]
(e.g. #3055).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3371: Perceptual color tables
-------------------------+-------------------------------------------------
  Reporter: baharmon | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.6.0
Component: Default | Version: svn-trunk
Resolution: | Keywords: r.colors, v.colors, inferno, magma,
       CPU: | plasma
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Changes (by wenzeslaus):

* keywords: r.colors, v.colors => r.colors, v.colors, inferno, magma,
               plasma
* milestone: 7.2.4 => 7.6.0

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3371: Perceptual color tables
-------------------------+-------------------------------------------------
  Reporter: baharmon | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.6.0
Component: Default | Version: svn-trunk
Resolution: | Keywords: r.colors, v.colors, inferno, magma,
       CPU: | plasma
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by pierreroudier):

Those palettes all share the same core characteristics: colorful,
perceptually uniform, and robust to colorblindness.

In my view, I like to switch between these depending on the data I am
representing -- for example I tend to prefer `magma` or `inferno` to
`viridis` to represent say temperature. I've found it useful to have
access to those different palettes and adapt to the context -- or
sometimes it might just boil down to personal preferences I suppose (how
does one use `magma` and not think of Dr. Evil in Austin Powers??).

More background/illustrations of those palettes:
https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-
viridis.html#the-color-scales

Suggested comments:

For inferno:

{{{
# perceptually uniform and sequential
# contains black, red and yellow
# color table developed for Matplotlib (default in 2.0)
# license of the original data: CC0
# original authors: Nathaniel J. Smith, Stefan van der Walt, Eric Firing
# created from cpt-city mpl inferno (r.cpt2grass -s)
}}}

For magma:

{{{
# perceptually uniform and sequential
# contains pale yellow, purple and black
# color table developed for Matplotlib (default in 2.0)
# license of the original data: CC0
# original authors: Nathaniel J. Smith, Stefan van der Walt, Eric Firing
# created from cpt-city mpl inferno (r.cpt2grass -s)
}}}

For plasma:

{{{
# perceptually uniform and sequential
# contains blue, pink and yellow
# color table developed for Matplotlib (default in 2.0)
# license of the original data: CC0
# original authors: Nathaniel J. Smith, Stefan van der Walt, Eric Firing
# created from cpt-city mpl inferno (r.cpt2grass -s)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#3371: Perceptual color tables
-------------------------+-------------------------------------------------
  Reporter: baharmon | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.6.0
Component: Default | Version: svn-trunk
Resolution: | Keywords: r.colors, v.colors, inferno, magma,
       CPU: | plasma
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by neteler):

Any objections to add the attached color files to trunk?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#3371: Perceptual color tables
-------------------------+-------------------------------------------------
  Reporter: baharmon | Owner: grass-dev@…
      Type: | Status: closed
  enhancement |
  Priority: normal | Milestone: 7.6.0
Component: Default | Version: svn-trunk
Resolution: fixed | Keywords: r.colors, v.colors, inferno, magma,
       CPU: | plasma
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Changes (by wenzeslaus):

* status: new => closed
* resolution: => fixed

Comment:

In [changeset:"73190" 73190]:
{{{
#!CommitTicketReference repository="" revision="73190"
add inferno, magma and plasma color tables (closes #3371, thanks to
pierreroudier)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3371#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>