24

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

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Artem
  • 1,037
  • 10
  • 19

4 Answers4

25

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

halirutan
  • 112,764
  • 7
  • 263
  • 474
20

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

Vitaliy Kaurov
  • 73,078
  • 9
  • 204
  • 355
17

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]
J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
7

Just to mention, for me the accepted answer does not bring the desired result with Mathematica 10. Instead, what I get when running

Plot3D[
  Cos[2 Norm[{x, y}]], {x, 0, 10}, {y, 0, 10},  
  Lighting -> {"Ambient", White},  
  PlotRange -> All, Mesh -> {20}, BoxRatios -> {1, 1, 0.1},  
  Boxed -> False, Axes -> False]

is this:

Orange looking 3d plot

However, a color function did the difference for me:

Plot3D[
  Cos[2 Norm[{x, y}]], {x, 0, 10}, {y, 0, 10},  
  Lighting -> {"Ambient", White}, 
  ColorFunction -> Function[{x, y, z}, White],  
  PlotRange -> All, Mesh -> {20}, BoxRatios -> {1, 1, 0.1}, 
  Boxed -> False, Axes -> False]

enter image description here

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
Nils
  • 71
  • 1
  • 1