# Is there a way to have Plot draw points on a function where the function is undefined as circles as in textbooks?

A very common feature of graphs of functions used throughout textbooks are simple indications, such as open circles, of the points at which a function is undefined. Is there a way to do this in Mathematica?

I understand that I can use Epilog (or Prolog, or other explicit drawing graphics functions) to "manually" draw these elements, but us there a way to automatically do this, or at least return the coordinates of such points for use as arguments to Epilog?

-

By using Exclusions and ExclusionsStyle like this

Plot[1/Sin[\[Pi] x], {x, -3, 3},
Exclusions -> Sin[\[Pi] x] == 0,
ExclusionsStyle -> {Thin, Directive[Red, PointSize[0.02]]}
]


you can define a style for poles and discontinuities.

Also the Wolfram Blog, March 2011 has more examples on this topic.

-
Why won't this work with Sin[x]/x, {x, -10, 10}, Exclusions -> {0}? –  raxacoricofallapatorius Jan 17 '12 at 21:46
actually, i don't know. But in this case you can get a more consistent result by specifying the points to be excluded by an implicit equation: Exclusions -> Sin[\[Pi] x]==0. I'll update the answer accordingly. –  Thies Heidecke Jan 17 '12 at 21:56
@raxacoricofallapatorius: In that case I would use Exclusions->x == 0. –  Mike Bantegui Jan 18 '12 at 0:38
You can use the ExclusionsStyle option to control how Mathematica renders regions excluded from the Plot.
Edit Doing something like ExclusionsStyle -> {None, {{Black, PointSize[Large]}}} will put a large point at the excluded points. For example, modifying a function from the help documentation: