printing grey scale with color overlay
Heiner Körnich
heiner at MISU.SU.SE
Thu Nov 16 04:01:11 EST 2006
Dear Mahakur,
I do not see a problem, except that my grads version does not like 100
for 'set rgb', but setting that to 99, it works fine, ie. all values
below 0 are grey, values above 0 get the shading from your colors.
To see my result, change 100 to 99 and for the grey tone I took 210, so
'set rgb 99 210 210 210'
As a variable I used lat, so 'd lat'.
I attach my png.
Best wishes,
Heiner
M.Mahakur wrote:
> Respected Heiner,
>
> I had tried with 'set rgb 100 x x x' (which is 20 in your e-mails), with
> x from 0 till 255 e.g. ( set rgb 100 0 0 0 ....., ...., set rgb 100 10
> 10 10). But could not found any change in intensity (while displaying,
> not checked for hard copy!).
>
> As shown below I wants to display varbl having values <= 0 as grey and
> color shades otherwise.
>
> palette()
> 'set display color'
> 'set gxout shaded'
> *'set rbcols auto'
> 'set clevs 0.0 0.1 0.5 2 3 4 5 7 9 12 15 20 25 30 35'
> 'set ccols 100 3 17 18 19 20 21 22 23 24 25 26 27 28 29 30 '
> *'set rbcols 100 3 17 18 19 20 21 22 23 24 25 26 27 28 29 30 '
> 'd varbl'
>
>
> ***************************************
> function palette()
> ***************************************
> 'set rgb 16 177 213 255'
> 'set rgb 17 104 173 255'
> 'set rgb 18 0 151 250'
> 'set rgb 19 0 112 225'
> 'set rgb 20 0 83 230'
> 'set rgb 21 0 44 128'
> 'set rgb 22 0 29 85'
> 'set rgb 23 0 0 20'
> 'set rgb 24 255 250 110'
> 'set rgb 25 255 209 116'
> 'set rgb 26 255 160 80'
> 'set rgb 27 255 100 65'
> 'set rgb 28 238 95 0'
> 'set rgb 29 255 90 0'
> 'set rgb 30 122 22 0'
> 'set rgb 100 10 10 10'
> return
>
> Regards,
>
> Mahakur
>
> Heiner Körnich wrote:
>
>> Dear Mahakur,
>>
>> you can change the brightness of grey with the number x in
>> 'set rgb 20 x x x '
>> The number 20 stands for the new defined colour.
>>
>> Here is a script for shaded output. In order to reset the rainbow colors
>> use 'set rbcols auto'. For colored contour plot, use 'set ccols ...' and
>> 'set clevs ...'.
>>
>> If your variable is ta:
>>
>> * define colour table
>> 'set rgb 21 0 0 0 '
>> 'set rgb 22 20 20 20 '
>> 'set rgb 23 40 40 40 '
>> 'set rgb 24 60 60 60 '
>> 'set rgb 25 80 80 80 '
>> 'set rgb 26 100 100 100 '
>> 'set rgb 27 120 120 120 '
>> 'set rgb 28 140 140 140 '
>> 'set rgb 29 160 160 160 '
>> 'set rgb 30 180 180 180 '
>> 'set rgb 31 200 200 200 '
>> 'set rgb 32 220 220 220 '
>> 'set rgb 33 240 240 240 '
>> * set rainbow sequence to grey shades
>> 'set rbcols 21 22 23 24 25 26 27 28 29 30 31 32 33'
>> 'set gxout shaded'
>> 'd ta'
>> 'set rbcols auto'
>> 'set gxout contour'
>> * choose colors for contours
>> 'set ccols 2 3 4 5 6'
>> * choose values of contours
>> 'set clevs 210 220 230 240'
>> 'd ta'
>>
>> Good luck,
>> Heiner
>>
>> M.Mahakur wrote:
>>
>>> Respected Heiner,
>>>
>>> Thanks! It wroked and display is better (more smoothed) than my earlier
>>> grey+color display. But, I can dim the grey shaded portion?
>>>
>>> Regards,
>>>
>>> Mahakur
>>>
>>> Heiner Körnich wrote:
>>>
>>>> Hi,
>>>>
>>>> you have to use always "set display color" and then define your own
>>>> color scale which has only grey colors, eg.
>>>> 'set rgb 20 15 15 15 '
>>>>
>>>> Then use the commands 'set clevs lev1 lev2 ...' and 'set ccols col1
>>>> col2
>>>> ...' in order to produce a grey shaded plot. These grey tones are also
>>>> grey in a colored PNG file.
>>>>
>>>> Greetings,
>>>> Heiner
>>>>
>>>> M.Mahakur wrote:
>>>>
>>>>> Respected Users,
>>>>>
>>>>> I can display the grey scale shaded plots overlapped with color (for
>>>>> non-zero) values using following few lines. As I wants to display all
>>>>> the plots having observations and white out the UNDEF (i.e. no
>>>>> satellite
>>>>> pass). But, when 'display' the gmf (stored using print) using the
>>>>> 'gxtran' or PNG file from 'printim' displays all with colors (no
>>>>> grey)
>>>>> i.e. it does save in the files what it was in the display. How can I
>>>>> over come this?
>>>>>
>>>>> -----------------------------------
>>>>> 'set gxout shaded'
>>>>> 'set display greyscale'
>>>>> 'd rr'
>>>>> *** DISPLAY IN GREY SHADES
>>>>> 'set display color'
>>>>> 'set clevs 0.1 0.5 2 3 4 5 7 9 12 15 20 25 30 35'
>>>>> 'set ccols 3 17 18 19 20 21 22 23 24 25 26 27 28 29 30 '
>>>>> 'd maskout(rr,rr-1.0e-33)'
>>>>> **** DISPLAY NON-ZERO VALUES IN RGB COLORS
>>>>> ---------
>>>>>
>>>>> Regards,
>>>>>
>>>>> Mahakur
>>>>>
>>>>
>>>> --
>>>> Heiner Körnich
>>>> Dept. of Meteorology Tel: +46 8 164333
>>>> Stockholms University, SE-106 91 Stockholm, Sweden
>>>> Email: heiner at misu.su.se www.misu.su.se/~heiner/
>>>>
>>>
>>
>> --
>> Heiner Körnich
>> Dept. of Meteorology Tel: +46 8 164333
>> Stockholms University, SE-106 91 Stockholm, Sweden
>> Email: heiner at misu.su.se www.misu.su.se/~heiner/
>>
>
--
Heiner Körnich
Dept. of Meteorology Tel: +46 8 164333
Stockholms University, SE-106 91 Stockholm, Sweden
Email: heiner at misu.su.se www.misu.su.se/~heiner/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 12555 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20061116/b40db080/attachment.png
More information about the gradsusr
mailing list