# How do I plot multi case function in wolfram or geogebra?

How do I plot the following multi case function in wolfram or geogebra?

$$\begin{eqnarray*} f(x) = \begin{cases} 1, &\text{if }x \text{ is an integer}, \\ 0, &\text{if }x \text{ is not an integer}. \end{cases} \end{eqnarray*}$$

The graph would be dots and underscores?

-
Here's a piecewise defined function (but the graph isn't what you want -- I'd like to know how to do that as well): "Piecewise[{{1, x == Floor[x]}}, 0]" Link: wolframalpha.com/input/?i=Piecewise[{{1%2C+x+%3D%3D+Floor[x]}}%2C+0] –  Bill Cook Oct 18 '11 at 13:26

I can't quite do that with a nice picture, but the reverse works more or less with ceiling(x)-floor(x) and looks like

-
I am amused that Alpha claims a numercal root at $x=1.1$ –  Ross Millikan Oct 17 '11 at 20:54
This is supposed to be equivalent, but somehow the expected gaps don't show up... –  Ｊ. Ｍ. Oct 17 '11 at 23:48