Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7321
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Transparent ContourPlot |
| Date | 2011-12-18 09:34 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jckc3t$1hu$1@smc.vnet.net> (permalink) |
| References | <201112161052.FAA06915@smc.vnet.net> |
To draw grid lines on top of the plot, you could use the (undocumented) option
Method->{"GridLinesInFront"->True}, so you could do something like
ContourPlot[x y^2 + 2, {x, -2, 2}, {y, -2, 2},
PlotRange -> {-10, 10},
Method -> {"GridLinesInFront" -> True},
GridLines -> Automatic]
If you still want to have a transparent shading, you probably want to set
Method -> {"TransparentPolygonMesh" -> True} as well which will get rid of the edges of
the individual polygons. You can combine these two options as follows
ContourPlot[x y^2 + 2, {x, -2, 2}, {y, -2, 2},
PlotRange -> {-10, 10},
Method -> {"GridLinesInFront" -> True, "TransparentPolygonMesh" -> True},
ColorFunction -> (Directive[Opacity[.5], ColorData["Rainbow"][#]] &),
ContourShading -> Automatic,
GridLines -> Automatic]
Heike
On 16 Dec 2011, at 11:52, dg wrote:
> I have been trying to create a contour plot where the contour shading is transparent, so that I can draw gridlines and see them through the contours. I can't seem to figure this one out....
>
> This produces a mess:
>
> ContourPlot[x y^2 + 2, {x, -2, 2}, {y, -2, 2}, PlotRange -> {-10, 10},
> ContourShading -> {Orange, Opacity[0.5]}]
>
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Transparent ContourPlot Heike Gramberg <heike.gramberg@gmail.com> - 2011-12-18 09:34 +0000 Re: Transparent ContourPlot JUN <noeckel@gmail.com> - 2011-12-19 12:17 +0000
csiph-web