2
$\begingroup$

I would like to extract the functions that describe the contours of a contour plot.

For example, if I have the function:

  ContourPlot[f[x,y], {x, 0, 4 Pi}, {y, 0, 4 Pi}, Contours -> 4]

I would like to have access to the 4 contours that were generated by the plot.

$\endgroup$
  • $\begingroup$ Their value or their colour? $\endgroup$ – chris Nov 24 '14 at 18:53
  • $\begingroup$ I am looking for an Interpolating function of the contour... $\endgroup$ – user13675 Nov 24 '14 at 19:07
4
$\begingroup$

if you want the values only

 plot = ContourPlot[x, {x, 0, 1}, {y, 0, 1}, Contours -> 4];
 Cases[FullForm[plot], Tooltip[{__}, b_] :>  b, Infinity]
$\endgroup$

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