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

I want to plot multiple functions with the same settings side-by-side, so I use the pure function construct (for clarity, I only use one function in this example)

   {x, 0, 1}
   ] & /@
   Chop[x, 0.5]

however, it somehow ignores the Chop function:

enter image description here

If I plot the function directly

   Chop[x, 0.5],
   {x, 0, 1}

everything works as expected:

enter image description here

I get similar behaviour with Plot3D. Do you see a problem in my code? Does the pure function and Map mechanism (/@) have something to do with it?

PS: I, in fact, want to use Plot3D. That's why I want to draw multiple plots next to each other instead of plotting all functions within one graphics object. I only chose showing the problem using Plot function in order to make the example simpler.

share|improve this question
Check the output of Chop[x, 0.5]... now you can see that the solution is to prevent Chop[...] inside the {...} from being evaluated until it is "inside" Plot. Now try with Unevaluated@Chop[x, 0.5]. – R. M. May 21 '14 at 13:45
up vote 5 down vote accepted

Chop[x, 0.5] evaluates to x because x is symbolic and not a number. Hence your map is equivalent to

Plot[...] & /@ {x}

which is what you see. The solution then is to prevent Chop from evaluating until it is "inside" Plot and this can be done with Unevaluated:

Plot[#, {x, 0, 1}] & /@ {Unevaluated@Chop[x, 0.5]}

share|improve this answer
Thank you very much for your valuable explanation! Now it works like a charm. – ivokabel May 21 '14 at 14:28

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.