1
$\begingroup$

I have a list of data points. From this list I generate a plot using ListCountourPlot. Mathematica interpolates multiple Countour lines.

I want to extract the points $(d,b)$ for a specific line which is the line $\omega_i = 0$ (red line).

How can I do that?

figure

Mathematica code:

j132 = Import["/home/mateus/Desktop/LaminarSeparationBubble/para_loop_20.dat"];

newStyle[x_] := x /. l_Line :> Sequence[Opacity[1], Thick, Red, l]

lista131 = 
  Table[{j132[[i, 2]], j132[[i, 1]], j132[[i, 9]]}, {i, 1, 
    Length[j132]}];

ListContourPlot[lista131, PlotLegends -> Automatic, Contours -> 30, 
  FrameLabel -> {"b", "d", "ωi"}, PlotRange -> All, 
  ImageSize -> 400] /. Tooltip[x_, 0] :> Tooltip[newStyle[x], 0]
$\endgroup$
  • $\begingroup$ Please post the Mathematica code you used to produce this plot. $\endgroup$ – Anton Antonov Aug 21 '17 at 18:06
  • $\begingroup$ If your data is too large to post here, please put it on Pastebin. $\endgroup$ – J. M. will be back soon Aug 21 '17 at 18:09
  • $\begingroup$ Edited Anton. Code posted. $\endgroup$ – Mateus Aug 21 '17 at 19:13
  • $\begingroup$ We don't have your para_loop_20.dat; you've already been told where to post it. $\endgroup$ – J. M. will be back soon Aug 21 '17 at 19:23
  • $\begingroup$ I've exceed the maximum paste size, J.M. $\endgroup$ – Mateus Aug 21 '17 at 19:31
1
$\begingroup$

I am not sure that I understand, but it seems to me that you already have a method to isolate the Line element corresponding to that contour line. In fact, you do that in your newStyle function.

Try:

Cases[
  Normal@ListContourPlot[lista131, Contours -> {{0}}],
  Tooltip[x_, 0] :> Cases[x, l_Line :> l[[1]]], Infinity
]
$\endgroup$
  • $\begingroup$ My objective in fact is draw a tangent line (derivate = 0) at this curve (wi = 0). So my plan is get these coordinates (d,b) for wi = 0, interpolate and get the point when derivate is = 0. $\endgroup$ – Mateus Aug 21 '17 at 20:08
  • $\begingroup$ @Mateus OK. Could you specify whether the method I proposed works to extract the (d, b) pairs at least? Also, if you need help with the rest of the problem, you should really include that in your original question. $\endgroup$ – MarcoB Aug 21 '17 at 20:13
  • $\begingroup$ @Mateus Strongly related: (85212). $\endgroup$ – Alexey Popkov Aug 21 '17 at 22:35
  • $\begingroup$ Thanks @AlexeyPopkov! $\endgroup$ – Mateus Aug 21 '17 at 22:45
  • $\begingroup$ @MarcoB it works! Thanks a lot! $\endgroup$ – Mateus Aug 21 '17 at 22:45

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.