import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2, 20) y = x*(2 - x) #y = np.cos(18 * np.pi * x) plt.plot(x, y) plt.show()