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.


marked as duplicate by Alexey Popkov, chris, Öskå, Jens, Simon Woods Nov 24 '14 at 20:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\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

if you want the values only

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

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