Ported all the drawing parts of analysis to matplotlib.