[GRASS-dev] [GRASS GIS] #3265: min and max value options for r.colors

GRASS GIS trac at osgeo.org
Wed Jan 18 09:01:53 PST 2017


#3265: min and max value options for r.colors
--------------------------+-------------------------
  Reporter:  veroandreo   |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  7.2.1
 Component:  Raster       |    Version:  unspecified
Resolution:               |   Keywords:  r.colors
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-------------------------

Comment (by mlennert):

 Why not "just" use a custom color table that you define yourself. IIUC,
 you would define the min and max values a priori anyhow, so something like
 this (for a grey color table):


 {{{
 0 10:10:10
 100 230:230:230
 }}}


 Or if you want the new default viridis table, you can just delete all the
 '%' in the color table as you work with percentage values anyhow. I.e.


 {{{
 0.000% 68:1:84
 0.392% 68:2:86
 0.784% 69:4:87
 1.176% 69:5:89
 [...]
 }}}

 becomes

 {{{
 0.000 68:1:84
 0.392 68:2:86
 0.784 69:4:87
 1.176 69:5:89
 [...]
 }}}

 Just put this in a file and add


 {{{
 r.colors map=LST_${j}_month_perc_${i} rules=YourColorFile
 }}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3265#comment:3>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list