2
$\begingroup$

If I specify the ContourShading to be the same color as the Contour they end up being a different color, see the example below.

ListContourPlot[
 Table[{i, j, Boole[i + j > 5]}, {i, 0, 10}, {j, 0, 10}] // 
  Flatten[#, {1, 2}] &
 , Contours -> {0.5}
 , ContourStyle -> Directive[ColorData[97][1], AbsoluteThickness[8]]
 , ContourShading -> {None, ColorData[97][1]}
 ]

How can I make them the same color?

$\endgroup$

1 Answer 1

4
$\begingroup$

Mathematica uses Opacity[0.5] that can be seen with InputForm of your graphics. So add Opacity[1] to ContourStyle option:

ListContourPlot[
Table[{i, j, Boole[i + j > 5]}, {i, 0, 10}, {j, 0, 10}] // 
Flatten[#, {1, 2}] &, Contours -> {0.5}, 
ContourStyle -> 
Directive[ColorData[97][1], AbsoluteThickness[8], Opacity[1]], 
ContourShading -> {None, ColorData[97][1]}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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