Is it possible to overlay two or more graphics in Mathematica, if the graphics are generated by functions such as ReliefPlot or DensityPlot, using Opacity to control the appearance?
For example:
a = ReliefPlot[
Table[i + Sin[i^2 + j^2], {i, -4, 4, .03}, {j, -4, 4, .03}], ImageSize -> 100]
b = ReliefPlot[
Table[i + Sin[i^3 + j^3], {i, -4, 4, .03}, {j, -4, 4, .03}], ImageSize -> 100]
Show[a,b]

combines the two, but I can’t work out how to insert an Opacity command anywhere here such that both are visible. The documentation states that these functions accept the same options as Graphics (“ReliefPlot has the same options as Graphics, with the following additions and changes:”), but I don’t understand how to control the graphics… (And I may be confused about the difference between graphics options and directives, as well.)
Enlightenment – and less opacity – very welcome!
Edit: Wow, you guys are quicker than my version of Mathematica – thanks!
You’ll have to issue the opacity directive to
ColorFunctionlike so:In general, in all
*Plot*functions, you control opacity with eitherPlotStyleorColorFunction, as the case may be. If this were just aGraphicsprimitive, you’d probably do something likeGraphics[{Opacity[0.5], object}].