       Re: Extracting points from a contour plot

• To: mathgroup at smc.vnet.net
• Subject: [mg90415] Re: Extracting points from a contour plot
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Tue, 8 Jul 2008 07:49:32 -0400 (EDT)
• Organization: Uni Leipzig
• References: <g4v34e\$ihi\$1@smc.vnet.net>

```Hi,

cntr = ContourPlot[Sin[Pi^2*x*y], {x, 0, 1}, {y, 0, 1},
Contours -> {0}, ContourShading -> False];
pnts = cntr[[1, 1]];
pidx = Union[Flatten[Cases[cntr, _Line, Infinity] /. Line -> List]];
ll = pnts[[#]] & /@ pidx;

and
Graphics[Point[ll]]

will show you, that you have found the right points.
And the accuracy of the generated points will to low
in the most cases.

Regards
Jens

ajfriend at gmail.com wrote:
> I'm not a Mathematica expert, so hopefully this isn't too stupid of a
> question:
>
> I'm using ContourPlot to plot the curve of zeros of a function of two
> variables within a range of vales (0 < x < 1, 0 < y < 1). Now, what I
> really want is the list of points that it generates. I've tried
> playing with Solve and NSolve, but these are either not working or are
> taking too long. What is the easiest way of getting at the list of
> points that ContourPlot has generated? Do I have to do something like
> InputForm[%] and then cut and paste the list that I want, or is there
> some easier way of doing it?
>
> Or, maybe there is a way of getting the points that I want without
> using ContourPlot that I haven't come across yet, or maybe I'm just
> not using Solve correctly.
>
> Any help would be great.
>
> Thanks,
> AJ
>

```

• Prev by Date: Re: How to make variable have package scope but not global scope.
• Next by Date: Re: Extracting points from a contour plot
• Previous by thread: Re: Extracting points from a contour plot
• Next by thread: Re: Extracting points from a contour plot