transparency in printim

Bernd Becker bernd.becker at METOFFICE.GOV.UK
Wed Mar 4 07:07:29 EST 2009


Hello,


to create images to be shown on google earth, I would like to
create shaded contour plots and contours and  symbols all in one png
file.

The areas, where nothing is shown in the image, I would like to be
transparent to see whatever google earth puts underneath.

I do:

'set parea 0 11 0 8.5'
'set grid off'
'set mproj scaled'
'set x  0.5  321.5  '
'set y  0.5  161.5  '
'set mpdraw off'
'set grads off'
'set frame off'

 clevels ='  -0.9 -0.5 -0.2 -0.1  0.1 0.2 0.5  0.9  '

'set cstyle 2  '
'set ccolor 1  '
'set cthick 1'
'set black 'subwrd(clevels,4)' 'subwrd(clevels,5)
*'set gxout shaded'
'set gxout grfill'
'set clevs 'clevels
'set ccols  14    4   11   5   0   16  7   12  2  '
'set black 'subwrd(clevels,4)' 'subwrd(clevels,5)


'd v7  - v6'


'set gxout shaded'
'set clevs 'clevels
'set ccols  14    4   11   5   0   16  7   12  2  '
'set black 'subwrd(clevels,4)' 'subwrd(clevels,5)
'd maskout((v8-v6),v1-23.)'


'set gxout shaded'
'set gxout contour'
'set cthick 1'
'set ccols 12 2 '
'set ccols 80   80 48  '
'set clab off'
'set clevs 'thresh
'd v5'


printim pop.png x320 y160 -t 1


Here I am uncertain about which colour code to use:
the colour number currently set in grads?
the current color code from the X server?

How can I ascertain, that the regions set to "black"
by 'set black'
are transparent in the png file?

These areas are shown as black, so "-t 1"  should do the trick,
but google earth shows the areas as black, opaque.

What should I do?

Many thanks,
Bernd.

--
Bernd Becker   The Monthly Outlook
Met Office  FitzRoy Road  Exeter   Devon EX1 3PB  United Kingdom
Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
E-mail:bernd.becker at metoffice.com  -  http://www.metoffice.com



More information about the gradsusr mailing list