added "import matplotlib.pyplot as plt"