Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

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

Is it possible to easily modify a Manipulate such that the slider automagically skips certain values?

For example, say I am plotting an equation that's perfectly well behaved for all values of x between x=0 and x=1 except for x=0.25 where it blows up and causes Mathematica to emit many error messages. I could, of course, check for x=0.25 in the body of the Manipulate and then do something sensible but it would be nice if I could just say to Manipulate 'Avoid x=0.25.'

share|improve this question
up vote 11 down vote accepted

It seems to me that this works:

Manipulate[1/(x - 0.25), {x, 0, 1, Exclusions -> {0.25}}]

(Exclusions is from Slider, I just tried it here and seems to do the job)

or slightly more clear:

Manipulate[1/(x - 0.25), {x, 0, 1, 0.25, Exclusions -> {0.25}}]
share|improve this answer
What Manipulate uses as default control for numeric values is a Manipulator which also has the Exclusions option and is called exactly like a Slider... – Albert Retey Mar 12 '13 at 9:19

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.