I need to plot a series of sets of intervals (and points) in the real line. Intervals can be closed, left/right-open or open. (Open/closed ends are marked with empty/filled circles) and isolated points are just dots. Groups of intervals may have a common style and a common legend. Below you can see a mock up.

I can get the basics with the following code
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[title = {Number line}, axis y line=none, y=0.5cm/3, restrict y to domain=0:20, axis lines=left]
\addplot+[only marks] coordinates {( 3.14, 0 )( 10, 0 )};
\addplot+[only marks] coordinates {( 20, 0 ) ( 21, 0 )};
\end{axis}
\end{tikzpicture}
\end{document}
but it is difficult to go further, because I couldn't find a way to change the style of the point (e.g. from filled to empty circles) within a coordinates and/or break a single coordinate set to plot two disjoint intervals and points with the same style (like the blue set in the picture).
And alternative that I found is to use tikz draws inside the axis environment
\draw[green, -|] (axis cs:5,0)--(axis cs:6,0); % something like "(-]" or "*-o" (if they worked) may be better
but the points are ignored to set the axis boundaries (which I need to be automatic). Also I need to use pgfplots to keep consistency with other (normal) plots (in terms of the style of the point and lines and the axis).
