3

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.

chris
  • 22,860
  • 5
  • 60
  • 149
user13675
  • 947
  • 1
  • 6
  • 15

1 Answers1

5

if you want the values only

 plot = ContourPlot[x, {x, 0, 1}, {y, 0, 1}, Contours -> 4];
 Cases[FullForm[plot], Tooltip[{__}, b_] :>  b, Infinity]
chris
  • 22,860
  • 5
  • 60
  • 149