I need help plotting the Heaviside function:Real analysis often involves constructing bizarre functions which are intuitively correct, but ultimately wrong.  See the great book Counterexamples in Analysis.I wrote a numpy script to plot the function $\displaystyle \sum_{n=1}^\infty \frac{1}{n^2} H\left(x - \frac{1}{n}\right)$ to illustrate some concepts in real analysis.  This is in a response to another question on math.stackexchange:  Demonstrating Continuity Properties of $f(x) = \sum_{n=1}^\infty [a_n H(x - x_n)]$Here was is example with accompanying plot:B = [ [1,n] for n in range(1,50) ]N = 1000y = np.zeros(N)count = 1for b in B:    x = np.zeros(N)    x[ np.arange(b[0]*1.0*N/b[1], N).astype(int)]=count**-2    y += x    count += 1plt.plot(np.arange(0,1,1.0/N),y)plt.axis(Equal)** How can I remove the vertical lines and really show the discontinuity? **
plotting discontinuous functions
python;numerical analysis;numpy