In [1]:
%matplotlib inline

In [6]:
import matplotlib.pyplot as plt

In [30]:
def f(n):
    return n**2

In [34]:
l = []
for x in range(-10,11):
    l.append(f(x))

In [35]:
plt.plot(l)


Out[35]:
[<matplotlib.lines.Line2D at 0xb0f8d96c>]

In [ ]: