# Plot3D without Shading, how to suppress it?

I want to plot a surface z=f[x,y] with Plot3D. This time I want to suppress the shading. I just want the mesh on the surface.

Setting ColorFunction -> Function[{x, y, z}, White] there is still some gray in this plot.

How can I suppress the shading altogether?

• Possible duplicate: mathematica.stackexchange.com/questions/22562/… May 3, 2017 at 12:33
• I think you should at least rephrase your question. As we already know you meant something different than people understood. Additionally your accepted answer not only has not shading, it is only a mesh... Which is something different then shade less white surface.
– Kuba
May 4, 2017 at 7:02

In:

shading = Array[None &, {2, 2}]; (*{{None, None}, {None, None}}*)
Plot3D[Sin[x + y], {x, -Pi, Pi}, {y, -Pi, Pi}, MeshShading -> shading]


Out:

• Thank you, this is exactly what I was after. May 3, 2017 at 12:09
• @AdalbertHanßen since this is what you are after, isn't PlotStyle -> None enough?
– Kuba
May 3, 2017 at 12:13
• @AdalbertHanßen Re Kuba's remark: On the face of it, the question is how to color the surface with no shading, not how to have no surface at al. (An alternative way, but not as good as PlotStyle -> None, is ColorFunction -> (Opacity[0] &), which is a way to adapt your original approach.) May 3, 2017 at 12:27
• @UnchartedWorks: Plot3D[Sin[x + y], {x, -Pi, Pi}, {y, -Pi, Pi}, MeshShading -> {{None, None}}] does the same. May 4, 2017 at 12:29
• @Kuba: Yes, Plot3D[Sin[x + y], {x, -Pi, Pi}, {y, -Pi, Pi}, PlotStyle -> None] also has the same visual effect. This is the most obvious one and I have to ask myself, why I did not try this one before asking my question, especially since its description clearly points out what it does: "PlotStyle->None specifies that the main objects in a plot should not be drawn explicitly, though mesh and filling are not affected." May 4, 2017 at 17:27

You need to:

• Set Glow on the surface. This adds a solid colour component to the shading.

• Set the other components to Black, to avoid reflecting any light.

This method does not require changing the global lighting, so it will not affect other objects in the scene.

Plot3D[
Sin[x] Sin[y],
{x, 0, 2 Pi}, {y, 0, 2 Pi},
PlotStyle -> Directive[Black, Glow[Pink]]
]


• PlotStyle -> Directive[Black, Glow[White]] would have been what I was after. How did you get that answer? Glow2 is not described in the help of Plot3D, however it is in the help of PlotStyle. May 3, 2017 at 12:34
• @AdalbertHanßen How you can figure it out: in PlotStyle we can use graphics directives. It is listed on the ref page of graphics directives. (But I do not remember where I saw this for the first time. Probably not on that page. I remembered Glow because I needed the same thing in the past.) May 3, 2017 at 14:07
• I looked up for Shading, but I found "As of Version 6.0, Shading has been superseded by ColorFunction." However I should have searched under Plot3D for substrings containing "Shading" to find a reference to MeshShading which is part of UnchartedWorks' solution. - Would it not be nice to have a function which asks for a search pattern (of the current help item) and then scans through all the descriptions of all Options directly or indirectly acessible from the current symbol (in my case: Plot3D) and which returns hyperlinks to all hits of the search pattern - ordered by option or sub-Option? May 3, 2017 at 16:20
• yes, that's what I was after. Thank you all. May 4, 2017 at 17:32

Another way is to set Ambient lighting on a white surface:

Plot3D[Sin[x] Sin[y], {x, 0, 2 Pi}, {y, 0, 2 Pi}, PlotStyle -> White,
Lighting -> {"Ambient", Pink}]


Or plot Pink and White light.

• Plot3D[Sin[x] Sin[y], {x, 0, 2 Pi}, {y, 0, 2 Pi}, PlotStyle -> White, Lighting -> {"Ambient", White}] would have been what I was after. I had tried it with PlotStyle->White before, but there remained shadows which were wiped out by your lighting conbditions. How did you get that answer? How would one have to improve the help function of Plot3D such that someone wanting such a skeleton plot arrives at an answer without checking this group? May 3, 2017 at 12:42
• @AdalbertHanßen don't know how to improve documentation but that can be found after scanning options available for Graphics3D and Plot3D. Not easy to find but possible.
– Kuba
May 3, 2017 at 12:51