5

How do I get rid of the mesh in this contour plot?

 ContourPlot[x^2 + y^2, {x, -10, 10}, {y, -10, 10}, 
    Contours -> {1.0, 4.0, 10.5}, ContourStyle -> None, 
    ContourShading -> {RGBColor[1, .2, 0, .1], RGBColor[1, .2, 0, .3], 
    RGBColor[1, .2, 0, .5], RGBColor[1, .2, 0, .7]}]

enter image description here

Setting the option Mesh->None doesn't help. I'm using Mathematica 12.1.1

QuantumDot
  • 19,601
  • 7
  • 45
  • 121

2 Answers2

7

From Removing unwanted appearance of underlying mesh, which is a duplicate:

ContourPlot[x^2 + y^2, {x, -10, 10}, {y, -10, 10}, 
 Contours -> {1.0, 4.0, 10.5}, ContourStyle -> None, 
 ContourShading -> {RGBColor[1, .2, 0, .1], RGBColor[1, .2, 0, .3], 
   RGBColor[1, .2, 0, .5], RGBColor[1, .2, 0, .7]}, 
 Method -> {"TransparentPolygonMesh" -> True}]

enter image description here

Michael E2
  • 235,386
  • 17
  • 334
  • 747
2

The mesh comes from reducing the opacity. To avoid the mesh, use fully opaque colors.

$Version

(* "12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020)" *)

Clear["Global`*"]

ContourPlot[x^2 + y^2, {x, -10, 10}, {y, -10, 10}, Contours -> {1.0, 4.0, 10.5}, ContourStyle -> None, ContourShading -> {LightRed, Pink, Red, Darker[Red]}]

enter image description here

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198