[gradsusr] Getting Transparent/user defined color kml poly files

Becker, Bernd bernd.becker at metoffice.gov.uk
Thu Jun 16 07:04:45 EDT 2016


Itesh,

from an old piece of grads code, try this (untested).

The lines below  produce contoured areas with symbols
so “it looks like” a transparency plot, which still makes sense when you over-plot in
certain areas (see attached example).

thresh=5
diff=climate-case_study    # you need to define your variable to plot somehwere
define dry= const(maskout(diff,diff-'thresh'),2)'
'set grads off'
'set gxout contour'
'set warn off'
'set clopts 'colourdry' 3 1'
'set cstyle 1'

'set rgb 67 200  60  60'    # define any colour you like by RGB values
colourdry=67
'set ccolor 'colourdry
'set clab off'
'set clevs 1'
* define values 1 where you don't want to shade area
* and draw one single contour in bespoke colour.

'd const(dry,1,-u)'
* repeat!  Honestly, first time around it does not work.
say 'set ccolor 'colourdry
'set ccolor 'colourdry
'set clab off'
'set clevs 1'
'd const(dry,1,-u)'

From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of itesh dash
Sent: 16 June 2016 10:47
To: GrADS Users Forum
Subject: [gradsusr] Getting Transparent/user defined color kml poly files

Dear All,

I am trying to export the rainfall output  to kml file to be able to plot in google map. I could do it easily with the set gxout kml with the -poly option.

The issue is, I want to set a transparent color or user defined color for the contours instead of the standard color. Though I can change the color codes manually, its not feasible for a large file. Can anybody help me on this.

What I could fine from the forum is this

http://gradsusr.org/pipermail/gradsusr/2011-September/031100.html

Which is not very clear how to set the transparency or use define color.

Regards,
Itesh


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160616/a400936f/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WWHazard_20160609.gif
Type: image/gif
Size: 29283 bytes
Desc: WWHazard_20160609.gif
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20160616/a400936f/attachment-0001.gif 


More information about the gradsusr mailing list