[GRASS-user] r.colors.stddev of a difference map

Veronica Andreo veroandreo at gmail.com
Sun Oct 26 07:22:03 PDT 2014


2014-10-25 22:43 GMT-03:00 Anna Petrášová <kratochanna at gmail.com>:

> Hi Veronica,
>
> On Sat, Oct 25, 2014 at 11:49 AM, Veronica Andreo <veroandreo at gmail.com>
> wrote:
>
>> Dear list,
>>
>> I'm working at time with anomalies maps, so I set r.colors to differences
>> palette, but as my maps also have null values and they appear as white too,
>> I edited the differences file to "nv black"... everything fine till
>> there... as differences are quite small most of the times (I'm working with
>> chlorophyll concentrations in the ocean) it's difficult to see something...
>> so i used r.colors.stddev with -z flag
>>
>> The problem arise when i use ps.map to generate my figures... somewhere
>> in the process "nv black" is over-ruled and my null values appear as white
>> in the .eps, which does not make sense... they are no-data and not zero
>> difference (if i use ps.map before using r.colors.stddev, nv looks black as
>> expected)... boh...
>>
>> Could someone explain why? or know of a workaround??? I have hundreds of
>> maps to produce...
>>
>> Thank you very much in advance!
>>
>>
> r.colors.stddev uses default nv, which results in white. So as a
> workaround, you can then run r.colors.out and change the line with nv to
> use 0:0:0. Then run r.colors with this new rules. This is a also
> scriptable. Faster solution is to hack r.colors.stddev (it's a python
> script) and add line in the rules which includes the nv 0:0:0. The right
> solution for this would be probably to add nv option to r.colors.stddev, it
> should be fairly simple, so if you know at least little bit of python, you
> can try that yourself:)
>
>
Thanks so much, Anna!!!

It worked :) I hacked r.colors.stddev adding "nv black" and that did the
trick! Unfortunately my Python skills end there (for now) :P

Baci,
Vero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20141026/a220a43b/attachment.html>


More information about the grass-user mailing list