Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

contour plot

  • To: mathgroup at
  • 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

 Hi,  I have some data in cylindrical coordinates ( r, theta, f ) and
 want to plot contours. I write the following program:


  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: 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

  • Prev by Date: Apparently easy ODE
  • Next by Date: Integrating Unit Step Functions (Convolution)
  • Previous by thread: Re: Apparently easy ODE
  • Next by thread: Integrating Unit Step Functions (Convolution)