# How to make this 3-D Plot Transparent?

Basically, I want to make this 3-D Plot transparent. I've already tried Opacity[]. I also want to change its color to e.g. light blue.

α= 1;
β= 1;
tmp = 0.1316;
ρ= 0.01;
t = -1.5;

fe[m_, p_] :=
1/2*(t - 1)*p^2 + 1/4*p^4 + (1/2*\α^2*β*m^2*(t - tmp)) +
1/4 α^2*(β)*(m^4) + 1/2*(\ρ*(p^2)*(m^2))

Show[SliceContourPlot3D[-z,
z == fe[m, p], {m, -3, 3}, {p, -3, 3}, {z, -6, 6}]]


• By the way, why use SliceContourPlot3D when Plot3D will do? – Rahul Apr 18 '16 at 19:38
• it will return to some error @Rahul – Nabil Apr 18 '16 at 19:38
• What error do you get with Plot3D[fe[m, p], {m, -3, 3}, {p, -3, 3}]? – Rahul Apr 18 '16 at 19:41
• It works, but somehow it shown different 3-D Graph. @Rahul – Nabil Apr 18 '16 at 19:43

You can use ContourShading with Directives to achieve both.

 α = 1; β = 1; tmp = 0.1316; ρ = 0.01; t = -1.5;

fe[m_, p_] := 1/2*(t - 1)*p^2 + 1/4*p^4 + (1/2*α^2*β*m^2*(t - tmp)) +
1/4 α^2*(β)*(m^4) + 1/2*(ρ*(p^2)*(m^2)) ;

SliceContourPlot3D[-z, z == fe[m, p], {m, -3, 3}, {p, -3, 3}, {z, -6, 6},


• can we remove the contour line? @RunnyKine – Nabil Apr 18 '16 at 19:35
• @Nabil Yes. Add Contours -> None – RunnyKine Apr 18 '16 at 19:37

You can add transparency to a color function. No need to make the whole plot to have one color.

Show[SliceContourPlot3D[-z,
z == fe[m, p], {m, -3, 3}, {p, -3, 3}, {z, -6, 6},
ColorFunction ->
Function[{z}, Opacity[0.4, #] &@ColorData["TemperatureMap"][z]],
ContourStyle -> None]]


• +1. I like your ColorFunction approach. – RunnyKine Apr 18 '16 at 20:58
• @RunnyKine I can't figure out how to obtain the default ColorFunction so you can apply Opacity to it. Any ideas? – BlacKow Apr 18 '16 at 21:04
• The following should give you the ColorFunction: ff = Trace[ SliceContourPlot3D[Exp[-(x^2 + y^2 + z^2)], x^3 + y^2 - z^2 == 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}], _Blend &] // Flatten // ReleaseHold. Then: cf = Function[{x}, Blend[x, #] &]@ff – RunnyKine Apr 18 '16 at 21:20
• @RunnyKine it works for this case! I asked a question about general solution. – BlacKow Apr 18 '16 at 22:23

Perhaps not entirely what you'd want but for fun sake:

Example:

SliceContourPlot3D[-z, z == fe[m, p], {m, -3, 3}, {p, -3, 3}, {z, -6, 6},ContourShading -> None];


Output:

Reference:

• ContourStyle[] does not really work – Nabil Apr 18 '16 at 19:51