Refactored DrawFunction in a base class independent of plotting and a subclass for Matplotlib. Added nose test for the base class.