Q:

How to Place Endpoints on the Graph of a Piecewise Functions

I'm trying to draw a piecewise function, and I am modifying the code that I found here: Graph of polynomial, scaling y-axis
This is what my code looks like so far.
\documentclass{article}
\usepackage{tkz-fct}
\begin{document}
\begin{tikzpicture}
\tkzInit[xmin=-5,xmax=5,ymin=-5,ymax=5,ystep=1]   
\tkzGrid
\tkzAxeXY
\tkzFct[color=blue,thick,domain = -5:0]{x**2};
\tkzFct[color=blue,thick,domain = 0:5]{x+1};
\end{tikzpicture}
\end{document}

My question is, now, that I have the function graphed, how can I add the endpoints to the graph. That is, I want an open circle at x=0 for the quadratic and a closed circle at x=1 for the linear function.

A:

The circles can be added once you set up the style (open or closed); then \tkzDefPointByFct will help place the circle at the correct spot.
\documentclass{article}
\usepackage{tkz-fct}
\begin{document}
\begin{tikzpicture}
\tkzInit[xmin=-5,xmax=5,ymin=-5,ymax=5,ystep=1]   
\tkzGrid
\tkzAxeXY
\tkzFct[color=blue,thick,domain = -5:0]{x**2};
\tkzSetUpPoint[shape=circle, size = 5, color=blue, fill=white]
\tkzDefPointByFct(0)
\tkzDrawPoint(tkzPointResult)
\tkzFct[color=blue,thick,domain = 0:5]{x+1};
\tkzSetUpPoint[shape=circle, size = 5, color=blue, fill=blue]
\tkzDefPointByFct(0)
\tkzDrawPoint(tkzPointResult)
\end{tikzpicture}
\end{document}

