termTwo[\[Kappa]_,\[Theta]_,\[Alpha]_,A_]:=Sum[((1+A^2)Cos[m \[Theta]](Sin[(m \[Kappa])/2])^2)/m^(1+\[Alpha]), {m, 1, 200}];
ContourPlot[(termTwo[\[Kappa], \[Theta], \[Alpha],
A]) /. {\[Theta] -> \[Pi]/6, A -> 0.3}, {\[Kappa],
0, \[Pi]}, {\[Alpha], 0, 5},
FrameLabel -> {Style["\[Kappa]", 16, Bold],
Style["\[Alpha]", 16, Bold]}, FrameStyle -> Thick,
PlotLegends -> Automatic]


The above code defines a function and plots it's contours per some varied parameters. I am interested only where the function is positive. How do I specify those contours?

Attempt:

ContourPlot[(termTwo[\[Kappa], \[Theta], \[Alpha],
A]) /. {\[Theta] -> \[Pi]/6, A -> 0.3}, {\[Kappa],
0, \[Pi]}, {\[Alpha], 0, 5},
FrameLabel -> {Style["\[Kappa]", 16, Bold],
Style["\[Alpha]", 16, Bold]}, FrameStyle -> Thick,
PlotLegends -> Automatic, Contours -> {0},


The above code does the opposite! It shows only where the function is negative.

• "The above code does the opposite!" -- Did you try reversing the ContourShading? Commented Jun 18 at 16:16
• @MichaelE2 oops... Commented Jun 18 at 16:19
• @MichaelE2 Should I delete the question? With the reverse shading (duh) it works as desired. Commented Jun 18 at 16:20
• Explanation: Suppose contours are drawn a numerical levels L1, L2, etc. in increasing order. In your case, you have just one, L1 = 0. Anyway, in general, ContourShading -> {dir1, dir2,...} means the shading and level curves are done in the order dir1, L1, dir2, L2, dir3...., with the directives (dir1 etc.) cycling around if there are more levels than directives. Commented Jun 18 at 16:20
• I suppose you can delete the Q. Though the site seems more tolerant of things explained in the documentation than it was a few years ago. Commented Jun 18 at 16:21

Answer: Try reversing the ContourShading (using Directive instead of a list sometimes prevents mis-parsing by *Plot commands):
ContourShading -> {None, Directive[Opacity[.5], ColorData[97][1]]}

Explanation: Suppose contours are drawn a numerical levels L1, L2, etc. in increasing order. In your case, you have just one, L1 = 0. Anyway, in general, ContourShading -> {dir1, dir2,...} means the shading and level curves are done in the order dir1, L1, dir2, L2, dir3...., with the directives (dir1 etc.) cycling around if there are more levels that directives.
• +1 Directive[Opacity[.5], ColorData[97][1]] can be simplified to Opacity[.5, ColorData[97][1]] Commented Jun 18 at 16:42