contour program using contour module and cdat 5.2

Hi to all.  

Here i pasted example program to draw contour using 
"" module.

Download the corrected "" module from the previous
post of mine.

Link :

save the in /home/[user-name]/example/     location.

copy the below example program and save it as 
"" and pasted in that same folder.

import numpy as n
import as N
from contour import contour

x = N.arange(15) * 15.0 - 180.0
y = N.arange(15) * 15.0 - 360.0
data = N.outerproduct(n.sin(y*n.pi/360.), n.cos(x*n.pi/360.))

a=contour(data, x, y, title='Example')

a=raw_input('press enter to view levels in contour')
levs = [-0.4,-0.2,0,1.6,2.7,2.1,2.3,2.5]
#levs = [-0.8,-0.2,0,0.5,0.7,0.9]
contour(data, x, y, c_levels=levs)
b=raw_input('press enter to close ')

Run the program :

$ cd /usr/local/cdat5.2/bin

$ ./cdat /home/[user-name]/example/

Output :

[ In 2 Dimensional view ]


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: