Added imports for matplotlib and numpy.