# Antialiasing option behaves weird (polygon edges visible in ContourPlot)

When I set the Antialiasing option in Style, I get the followings:

plot = ListContourPlot[
Table[Sin[i + j^2], {i, 0, 2, 0.05}, {j, 1.2, 2, 0.05}],
ColorFunction -> ColorData["AvocadoColors"], Contours -> 10,
Mesh -> False, ImageSize -> 400];
Grid@{{
Style[plot, Antialiasing -> Automatic],
Style[plot, Antialiasing -> True],
Style[plot, Antialiasing -> False]
}}


For Antialiasing -> Automatic, everything is fine. Though Antialiasing -> True reveals polygon edges while still maintaining antialias on contourlines, frames, etc. Antialiasing -> False gives a plot where nothing is antialiased and polygon edges are not visible.

There is this thing written in the documentation for [Antialiasing][1]:

With the default setting Antialiasing -> Automatic, choices are made to optimize appearance on each type of computer system.

I would not say this is an optimal appearance. Can anyone tell me the logic/algorithm behind Automatic in this case?

-

## 1 Answer

I believe that forcing anti-aliasing renders the edges of the polygons with alpha transparency, and that where two of these adjoin there is a region that remains partially transparent, through which the background shows. Example:

Style[plot, Antialiasing -> True, Background -> Magenta]


-
Yes, that makes sense. Thanks for revealing it. Though I don't really understand why transparency of edges is involved in antialiasing. – István Zachar Jan 20 '12 at 16:51
@Istvan, I believe it is one of the standard methods when compositing, and it probably makes more sense for live graphics than oversampling does. – Mr.Wizard Jan 20 '12 at 17:12