[gradsusr] Cannot plot color bar: No shading information.

Zablone Owiti zablonowiti at yahoo.com
Mon Apr 11 08:45:06 EDT 2011


Hi Salkim,
The problem with the code is that you did not tell grads in your second define which file to get the variable from. You can do this
by using (evp.1 and evp.2 for the first and second files respectivel). I wonder why you are the colour palette TWICE and resetting.
See below  a revised code
 
'reinit'
'open SRFreadRF.ctl'
'open SRFreadFUT.ctl''set mpdset hires'
'set gxout shaded'
'set display color white'
'c'
'define rf=ave(evp.1,t=1,t=12)'
'define fut=ave(evp.2,t=1,t=12)'
palette()
'set gxout shaded''set clevs -5 -4 -3 -2 -1 1 2 3 4 5'
'set ccols 16 17 18 19 20 21 22 23 24 25'
'd (fut-rf)'
'run /usr/local/lib/grads/cbar.gs'
'draw title Difference between Future and RF datas'
'printim diffevp.gif'
function palette()
'set rgb 16   0   0 255'
'set rgb 17  55  55 255'
'set rgb 18 110 110 255'
'set rgb 19 165 165 255'
'set rgb 20 220 220 255'
'set rgb 21 255 220 220'
'set rgb 22 255 165 165'
'set rgb 23 255 110 110'
'set rgb 24 255  55  55'
'set rgb 25 255   0   0'
return


===================================================
ZABLONE OWITI
GRADUATE STUDENT
Nanjing University of Information, Science and Technology
College of Atmospheric Science
Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China
Tel: +86-25-58731402
Fax: +86-25-58731456
Mob. 15077895632
Website: www.nuist.edu.cn
====================================================
"The real art of conversation is not only to say the right thing at the right time, but also to leave unsaid the wrong thing at the tempting moment."
 


From: Emre Salkım <emre at me.com>
>To: gradsusr at gradsusr.org
>Sent: Monday, 11 April 2011 7:20 PM
>Subject: [gradsusr] Cannot plot color bar: No shading information.
>
>
>Dear Users,
>
>
>I would like to ask a question about a message that Grads gives when I try to run my script shown below.
>
>
>'c'
>'open SRFreadRF.ctl'
>'set mpdset hires'
>'set gxout shaded'
>'set display color white'
>'set rgb 16   0   0 255'
>'set rgb 17  55  55 255'
>'set rgb 18 110 110 255'
>'set rgb 19 165 165 255'
>'set rgb 20 220 220 255'
>'set rgb 21 255 220 220'
>'set rgb 22 255 165 165'
>'set rgb 23 255 110 110'
>'set rgb 24 255  55  55'
>'set rgb 25 255   0   0'
>'set clevs -5 -4 -3 -2 -1 1 2 3 4 5'
>'set ccols 16 17 18 19 20 21 22 23 24 25'
>'define rf=ave(evp,t=1,t=12)'
>'reset'
>'open SRFreadFUT.ctl'
>'set mpdset hires'
>'set gxout shaded'
>'set display color white'
>'set rgb 16   0   0 255'
>'set rgb 17  55  55 255'
>'set rgb 18 110 110 255'
>'set rgb 19 165 165 255'
>'set rgb 20 220 220 255'
>'set rgb 21 255 220 220'
>'set rgb 22 255 165 165'
>'set rgb 23 255 110 110'
>'set rgb 24 255  55  55'
>'set rgb 25 255   0   0'
>'set clevs -5 -4 -3 -2 -1 1 2 3 4 5'
>'set ccols 16 17 18 19 20 21 22 23 24 25'
>'define fut=ave(evp,t=1,t=12)'
>'d (fut-rf)'
>'run /usr/local/lib/grads/cbar.gs'
>'draw title Difference between Future and RF datas'
>'printim diffevp.gif'
>'quit'
>
>
>As I run this script Grads says:
>
>
>"Cannot plot color bar: No shading information". 
>
>
>Although I've set gxout shaded and also I've set rgb colors that I wanted to use already. What I try to do in this script is to get the difference of a variable, between the future and past datas from two different data files. I really couldn't find where I am making the mistake. Can you please help me? 
>
>
>I am running the latest Grads version available (GrADS 2.0.a9) for Mac and am running Grads on Mac OS X 10.6.7.
>
>
>Thank you and best regards;
>
>
>Emre Salkim
>
>
>
>
>_______________________________________________
>gradsusr mailing list
>gradsusr at gradsusr.org
>http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110411/729752bf/attachment-0003.html 


More information about the gradsusr mailing list