1
$\begingroup$

This question already has an answer here:

In traditional textbooks you'll see open and closed dots to indicate whether to include or exclude the point respectively. How can I modify this code to include open and closed dots at x=2? I don't see any options available in Plot.

Plot[Piecewise[{{.5 (x - 2)^2 + 4, x < 2}, {1, x >= 2}}], {x, -2, 5}]

I'm looking for something like below. I'm hoping to avoid manually adding dots using Graphics Point and then specify the exact coordinates. This is a pain. Is there a faster way?

enter image description here

$\endgroup$

marked as duplicate by J. M. will be back soon Dec 14 '15 at 11:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2
$\begingroup$
Plot[Piecewise[{{.5 (x - 2)^2 + 4, x < 2}, {1, x >= 2}}], {x, -2, 5},
 Epilog -> {
   PointSize[0.03], Blue, Point[{2, 1}],
   PointSize[0.02], White, Point[{2, 1}],
   PointSize[0.03], Blue, Point[{2, 4}]},
 Exclusions -> 2,
 PlotTheme -> "Detailed"]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.