How to combine 3D Graphics?

32 views
Skip to first unread message

Jee Lou

unread,
May 10, 2012, 4:49:05 AM5/10/12
to mathe...@googlegroups.com
I have tried to combine a translucent 3D-plot graph with its density plot by using Show. But it doesn't work. Here's my code:
g1=Plot3D[Sin[x + y], {x, 0, Pi}, {y, 0, Pi}, Mesh -> False,PlotStyle->Opacity[.5]];
g2=DensityPlot[Sin[x + y], {x, 0, Pi}, {y, 0, Pi}, Frame -> False];
g3=Plot3D[-1, {x, 0, Pi}, {y, 0, Pi}, Mesh -> None,TextureCoordinateFunction -> ({#1, #2} &), PlotStyle -> Directive[Texture[g2]]];
Show[g1,g3]
It turns out that the density graph disappears T_T.
How can I make it right? 
question.nb

Chunguang Li

unread,
Sep 18, 2015, 8:50:15 AM9/18/15
to Mathematica
Jee Lou,
    In fact, you can let Opacity[.5] be Opacity[.05], make g1 is more transparent, then you can get the density graph clearly.

Li Chunguang.

在 2012年5月10日星期四 UTC+8下午4:49:05,Jee Lou写道:
Reply all
Reply to author
Forward
0 new messages