Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When plotting in Mathematica I just got some "dark artifacts". Here is my code:

Plot3D[Exp[-100 x^2], {x, -5, 5}, {p, -5, 5}, PlotRange -> All, PlotPoints -> {100, 100}]

and the result isenter image description here

(I know that the 3D is useless here, but I minimized my actual code to the relevant problem). I have the feeling that it has something to do with the precision, when there is the transition from 10^-200 or so to 0 but increasing the WorkingPrecision didn't change anything.
I tried plotting in 2D from x = 2.3 and there is still an exponential function with value 10^-175 to see. When I plot from 3 to 4 (which is after the dark artifact line) then the 2D Plot says just zero.

I don't need to caluculate with super high precision, I just want to get rid of those dark strips.
I also tried to look for similar questions but couldnt find one, perhaps because I don't really know if artifacts is the right word.

share|improve this question
it's just fp noise. Try plotting Chop@Exp[-100 x^2] to get rid of them. – R. M. Nov 10 '13 at 17:22
up vote 9 down vote accepted

Chop is useful here:

You can use it inside the Plot3D (as rm -rf wrote in the comment) for rounding small values of Exp

Plot3D[Chop@Exp[-100 x^2], {x, -5, 5}, {p, -5, 5}, PlotRange -> All, PlotPoints -> 100]

If your function is complicated you can use Chop as the post-processing function

Chop@Plot3D[Exp[-100 x^2], {x, -5, 5}, {p, -5, 5}, PlotRange -> All, PlotPoints -> 100]

In the both cases results are the same:

enter image description here

share|improve this answer
thx to you, ybeltukov, and rm -rf. i appreciate the post-processing option :) – user104857 Nov 10 '13 at 18:29

Your Answer


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.