Re: Contour Lines

*To*: mathgroup at smc.vnet.net*Subject*: [mg83610] Re: Contour Lines*From*: Thomas E Burton <tburton at brahea.com>*Date*: Sat, 24 Nov 2007 04:17:59 -0500 (EST)

In the spirit of the notion that a fishing pole is better in the long run than a fish, let me share a recipe to solve this: 1. Look into plot1, note the expression GraphicsComplex. 2. GraphicsComplex is new to v6, so look it up in help. 3. Follow your nose, leading to something like the following: pointList = Cases[plot1, GraphicsComplex[points_, data_] :> Cases[data, Line[pts : {__Integer}] :> points [[pts]], Infinity] ][[1, 1]] or pointList = Cases[ Cases[plot1, gc_GraphicsComplex:> Normal[gc]], Line[points_List] :> points, Infinity][[1]] I use Cases so I don't have to remember where things are. You can certainly shorten these expressions. Tom > How do you extract the coordinates of points making up a Contour > Line as a List? > > This has been dealt with before in the archive (see e.g., ) but the > code there seems no longer to work. ... > > Convert the ContourGraphics to Graphics and then extract the first > part and you will see how Mathematica represents the contours. > > contour = First@Graphics@plot1 (output omitted) ...