In [28]:
import numpy as np
from __future__ import division
from sympy import *
from matplotlib import pyplot as plt
%matplotlib inline

In [29]:
X = np.arange(-3, 4)
X


Out[29]:
array([-3, -2, -1,  0,  1,  2,  3])

In [30]:
def f(x):
    return x**2 + 1

In [31]:
f(X)


Out[31]:
array([10,  5,  2,  1,  2,  5, 10])

In [32]:
plt.scatter(X, f(X))
plt.show()



In [36]:
x = symbols('x')

plot(sin(x))
plt.show()



In [ ]: