xx = np.arange(0, 6, 0.2)
vals = M.array(xx)
mvals = M.masked_where(vals % 2 == 0, vals)
subplot(122)
plot(xx, mvals, color='b', linewidth=3)
plot(xx, vals, 'rx')
show()
how to handle an asymptote/discontinuity with Matplotlib