7
$\begingroup$

I have a list of data as .dat file in my dropbox.

And I have plot with ListContourPlot by this way:

j132 = Import["paraloop_8.dat"]; lista131 = Table[{j132[[i, 1]], j132[[i, 2]], j132[[i, 8]]}, {i, 1, Length[j132]}]; newStyle[x_] := x /. l_Line :> Sequence[Opacity[1], Thick, Red, l] ListContourPlot[lista131, Contours -> 50, PlotLegends -> Automatic, FrameStyle -> FontSize -> 14, ImageSize -> 350] /. Tooltip[x_, 0] :> Tooltip[newStyle[x], 0] 

This way I can color with red the contour with value equal zero, but, if I want colorize the contour with another value, for exemple, 0.018 I can't. What can be wrong?

$\endgroup$
1
  • $\begingroup$ 0.018 is not one of the 50 automatically generated contour lines. $\endgroup$ Commented Sep 12, 2018 at 21:32

1 Answer 1

9
$\begingroup$

You can use MeshFunctions, Mesh and MeshStyle:

mesh ={ 0.18}; ListContourPlot[j132[[All, {1, 2, 8}]], Contours -> 50, PlotLegends -> Automatic, FrameStyle -> FontSize -> 14, ImageSize -> 350, MeshFunctions -> {#3 &}, Mesh -> {mesh}, MeshStyle -> Directive[Opacity[1, Red], Thick]] 

enter image description here

Note: An alternative and simpler way to get your lista131 is to use 132[[All, {1, 2, 8}]]:

lista131 == j132[[All, {1, 2, 8}]] 

True

With a smaller (Downsampled) version of input data

mesh = {0.018, {.2, Directive[Dashed, Thick, Purple]}}; j132small = Downsample[j132[[All, {1, 2, 8}]], {20, 1}] ListContourPlot[j132small, Contours -> 50, PlotLegends -> Automatic, FrameStyle -> FontSize -> 14, ImageSize -> 350, MeshFunctions -> {#3 &}, Mesh -> {mesh}, MeshStyle -> Directive[Opacity[1, Red], Thick]] 

enter image description here

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.