Moved import pyplot to inside plot function