eg. you want a plot of function: f(w) = 5-(w-10)² for w in the range 0..19
import matplotlib.pyplot as plt x=range(20) y=map( lambda w: 5-(w-10)**2, x) plt.plot(x,y) plt.show()