Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Mathematica has great plotting capabilities. However, sometimes what is needed is a very basic black and white plot without textures, lighting, glow and other complex features. So, here is my question: what kind of Plot3D options will allow me to get something similar to

share|improve this question

3 Answers 3

up vote 17 down vote accepted

I would say you go for the Lighting option:

Plot3D[Exp[-(x^2 + y^2)], {x, -2, 2}, {y, -2, 2}, 
 Lighting -> {{"Ambient", White}}, PlotRange -> All, Mesh -> {20}]

Mathematica graphics

share|improve this answer
1  
In fact, Lighting -> {White} is enough. –  xzczd Apr 3 '13 at 4:54
2  
yes, but I wanted to mention explicitly that it's the ambient light which prevents shading. –  halirutan Apr 3 '13 at 5:01

Just a few alternatives. (from @Mr.Wizard) If one prefers to have it simple but to keep shading, then

Plot3D[Exp[-(x^2 + y^2)], {x, -2, 2}, {y, -2, 2}, 
 Lighting -> "Neutral", PlotRange -> All, Mesh -> {20}]

enter image description here

Some may want to have transparent mesh

Plot3D[Exp[-(x^2 + y^2)], {x, -2, 2}, {y, -2, 2}, PlotRange -> All, 
 Mesh -> {20}, PlotStyle -> Opacity[0], MeshStyle -> Opacity[.5]]

or from @J.M.

Plot3D[Exp[-(x^2 + y^2)], {x, -2, 2}, {y, -2, 2}, 
 PlotStyle -> FaceForm[None], PlotRange -> All, Mesh -> {20}]

enter image description here

share|improve this answer
    
Do you have any thoughts about ColorFunction -> (White &) versus Lighting -> "Neutral"? I typically use the latter. –  Mr.Wizard Apr 3 '13 at 6:22
    
For the second: PlotStyle -> FaceForm[None] works nicely, too. –  J. M. Apr 3 '13 at 7:51
    
@Mr.Wizard Lighting -> "Neutral" is more efficient I think - I edited it into my code. Thx ;) –  Vitaliy Kaurov Apr 3 '13 at 15:52
    
@J.M. Yes, nice observation ;) –  Vitaliy Kaurov Apr 3 '13 at 15:53
    
@Mr. Wizard, through close reading of the docs for Plot3D[], it would seem that ColorFunction -> (White &) is entirely equivalent to the default ColorFunction -> Automatic, so one does not really need to tweak ColorFunction for a plain Jane plot... –  J. M. Apr 3 '13 at 16:02

If one wants a simple wireframe mesh, as in Vitaliy's answer, here's yet another method:

DeleteCases[Plot3D[Exp[-(x^2 + y^2)], {x, -2, 2}, {y, -2, 2}, Mesh -> {20}], _Polygon, ∞]

wireframe plot


As it turns out, however, there is an even simpler way to generate a nice wiremesh:

Plot3D[Exp[-(x^2 + y^2)], {x, -2, 2}, {y, -2, 2}, Mesh -> {20}, PlotStyle -> None]
share|improve this answer
    
There's a certain beauty to this approach. "Polygons, begone!" :-) –  Mr.Wizard Apr 11 '13 at 12:58
    
That's more or less how I read the code, too. :) –  J. M. Apr 11 '13 at 13:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.