I am trying to use a ColorFunction with Opacity in ContourPlot. Here's my code:
data = RandomVariate[BinormalDistribution[.75], 10];
d = SmoothKernelDistribution[data];
cf[z_] := {Opacity[z], Red};
sc1 = ContourPlot[
Evaluate@PDF[d, {x, y}], {x, -3, 3}, {y, -3, 3},
PlotRange -> All, PlotPoints -> 50, ColorFunction -> cf,
ColorFunctionScaling -> True]
And here's what it produces:
How can the ugly mesh be avoided? I am using Mathematica 8.0.1 in OS X.
Mesh -> None
give what you need? Btw, I don't get the "ugly mesh" with Version 9 on Windows Vista 64 bit. $\endgroup$