contour plot
- To: mathgroup at smc.vnet.net
- Subject: [mg22931] contour plot
- From: Richard S Hsu <rhsu at U.Arizona.EDU>
- Date: Thu, 6 Apr 2000 02:04:47 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi, I have some data in cylindrical coordinates ( r, theta, f ) and
want to plot contours. I write the following program:
Needs["ExtendGraphics`Contour`"];
polar[f_] := Module[ {t1,r,x,y },
t1 = ReadList[ f, Number, RecordLists -> True ] ;
cc = {} ;
For[ i=1, i<=Length[t1], i++,
r=t1[[i,1]] ;
x = r*Cos[ t1[[i,2]] ] ;
y = r*Sin[ t1[[i,2]] ] ;
AppendTo[ cc, { x, y, t1[[i,3]] } ] ;
] ;
ListContourPlot[ cc ]
];
It works fine for my data file "test.1",
but gave an error message for date file "test.2".
In[1] := <<polar.m ;
In[2] := polar["test.1"]
out[2]= -ContourGraphics-
in[3] := polar["test.2"]
delaunay: delaunay.tm.c:459: norm: Assertion `res != 0.0' failed.
I put "test.1" and "test.2" in Attachmnt.
Thanks to any help.
Also, do anyone know if I could plot contours from above data
without using delaunay?
Richard Hsu