1
$\begingroup$

I have a set of functions d=d(b) defined implicitly by the equation

f(b,d)=0.

I have plotted that equation using ContourPlot. The problem is that I need to get the coordinates drawn in the plot (or maybe get the coordinates using only the equation) in an accurate way. I have already seen this question:

Getting a list of accurate coordinates from a plot

but it seems that the solutions only solve the problem when you use the Plot function. Also, I have tried to use drawing tools, but that doesn't seem so accurate and I would like to get the coordinates of all the points in the plot.

$\endgroup$
2
2
$\begingroup$

You can use the Cases idea that's usually used with Plot (see this post) if you first send the contour plot (read: GraphicsComplex) through a Normal.

Normal@ContourPlot[Norm@{x, y} == 1, {x, -1, 1}, {y, -1, 1}];
Cases[%, Line[data_] :> data, \[Infinity]][[1]]

{{0.0690086,-0.99758},<<261>>,{0.0690086,-<<17>>}}

$\endgroup$
1
  • $\begingroup$ Perhaps a little bit simpler: ContourPlot[Norm@{x, y} == 1, {x, -1, 1}, {y, -1, 1}][[1]][[1, 1]] $\endgroup$ Jul 20 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.