**Update:** Post-processing using custom `Arrowheads`

:

```
g1 = Graphics[Disk[]];
g2 = Graphics[{EdgeForm[Thick], FaceForm[White], Disk[]}];
plt /. Line[x_] :> {Arrowheads[{{-.01, 0, g2}, {.0125, 1, g1}}], Arrow[x]}
```

**Original post:**

One approach is to post-process the plot output to add filled and an empty circles to the lines:

```
f[x_] := Piecewise[{{0, -Infinity < x <= -4}, {0.2, -4 < x <= -2},
{0.5, -2 < x <= 2}, {0.9, 2 < x <= 6}}, 1]
plt=Plot[f[x], {x, -6, 10}, PlotTheme -> "Detailed"];
plt/. Line[x_] :> {Line[x], AbsolutePointSize[8], Point[Last@x],
AbsolutePointSize[8], Point[First@x],
{White, AbsolutePointSize[5], Point[First@x]}}
```

In version 9, you can specify the `PlotStyle`

to add filled and empty circles to `Line`

primitives (this trick doesn't seem to work in version 10):

```
Plot[f[x], {x, -6, 10}, PlotLegends -> "Expressions",
PlotStyle -> ({#, AbsolutePointSize[8], Point[Last @@ #],
Point[First @@ #], {White, AbsolutePointSize[5], Point[First @@ #]}} &)]
```

```
f2[x_] := Piecewise[{{x^2 - 5, -Infinity < x <= -4}, {x + 5, -4 < x <= -2},
{10 - x^2, -2 < x <= 2}, {x^2 - 2 x - 4, 2 < x <= 6}}, 10]
Plot[f2[x], {x, -6, 10}, PlotLegends -> "Expressions",
PlotStyle -> ({#, AbsolutePointSize[8], Point[Last @@ #],
Point[First @@ #], {White, AbsolutePointSize[5], Point[First @@ #]}} &)]
```

2

See http://mathematica.stackexchange.com/questions/39445/plot-discontinuous-function-with-black-and-white-disks-marking-discontinuities/39466#39466

– Michael E2 – 2015-03-15T01:24:03.8331It worked, however I'm surprised it's not included as part of Mathematica and requires external functions. – stil – 2015-03-15T01:42:32.943