How to plot the contour shaded with a color bar?

mmacleod mmacleod at SCOTIAWEATHER.COM
Tue Jul 29 15:14:41 EDT 2008


Hi Fang

If you want the contour values as I had in the PNG file I sent then

after 'd prep'
and

before 'set font 1'


add

'set gxout contour'
'set clevs -20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0 1'
'set ccols  1   1   1   1   1   1   1  1  1  1 1 1'
'set cstyle 2 '
'set cthick 4 '
'd prep'

This will draw contours in black as the selected level then number the contour in black as well. If you want to use the a different colour then change the 1 (black to the number of the colour you want)  Note: if you use the same colour for the contours as the  shading then you will not see the contours nor the value of the contours displayed.)

Hope this helps.

Mac



Qingfang Dai wrote:
> Hi Mac,
>
> The attachment is the GIF file I got. Thanks.
>
> Fang
>
>
> On Tue, 29 Jul 2008 18:38:47 +0000, mmacleod wrote
>
>> Hi Fang
>>
>> If you can send a copy of the GIF file generated so I can see what is
>> produced I might be able to help.  We do this type of output all the
>> time.  I am attaching a copy of an output (it is in PNG but the same
>> thing appears in GIF if I specify that format) to see if this is the
>> type of thing you are looking for.
>>
>> Regards,
>>
>> Mac
>>
>> Qingfang Dai wrote:
>>
>>> Dear all users,
>>>
>>> I want to plot EOF data into contour shaded with a color bar. Now my GS
>>>
> file
>
>>> is as follows:
>>>
>>> 'reinit'
>>> 'open ../ABMapsForReport/EOF_Jan.ctl'
>>> 'set grads off'
>>> 'set mproj nps'
>>> 'set grid off'
>>> 'set frame off'
>>> 'set gxout shaded'
>>> 'set clevs -20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0 1'
>>> 'set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6'
>>> 'set cstyle 1'
>>> 'set csmooth off'
>>> 'set t 1 1'
>>> 'set mpdset ../province'
>>> 'd prep'
>>> 'set font 1'
>>> 'set string 1 tc 3'
>>> 'set strsiz 0.15 0.15'
>>> 'draw title EOF1 1961-2000 January'
>>> 'cbarn'
>>> 'printim ../EOF1_Jan.gif gif white'
>>>
>>> But I don't know why the color bar I got without data. I am wondering
>>>
> how to
>
>>> plot a coutour shaded with a color bar which display each color denotes
>>>
> each
>
>>> data interval. Thanks.
>>>
>>>
>>> Yours Faithfully,
>>>
>>> Fang
>>>
>>>
>> --
>> M.A. (Mac) MacLeod
>> President and General Manager
>> Scotia Weather Services Inc
>> 192 Wyse Road, Suite 8,
>> Dartmouth, N.S. B3A 1M9
>>
>> Tele: 902-468-3866
>> Fax:  902-461-1768
>> E-mail: mmacleod at scotiaweather.com
>> Visit us: www.scotiaweather.com
>>
>
>
> --
> Department of Math and Stat Sciences (http://www.math.ualberta.ca)
>
>
>
> ------------------------------------------------------------------------
>

--
M.A. (Mac) MacLeod
President and General Manager
Scotia Weather Services Inc
192 Wyse Road, Suite 8,
Dartmouth, N.S. B3A 1M9

Tele: 902-468-3866
Fax:  902-461-1768
E-mail: mmacleod at scotiaweather.com
Visit us: www.scotiaweather.com



More information about the gradsusr mailing list