I'm writting a document in maths and I want to add the graph of the Dirichlet Function. I was googling to find the tikz code of something like that but unfortunately I found nothing...
The graph is what seems in the picture:

I don't know how to plot it in tikz... and a link I found https://github.com/MartinThoma/LaTeX-examples/blob/master/tikz/dirichlet-function/dirichlet-function.tex
well while it was compiled... the graph was nowhere to be seen.
So, I would be more than happy if someone could provide me a link where I can copy the cody or draw that for me... I know it's a long shot!

pst-func. Can easily be changed to draw lines, if needed. – Dec 05 '14 at 14:49