import numpy as np
import matplotlib.pyplot as plt

# Set seed, so random number is reproduceable
np.random.seed(0)

# Generate x and y on linear relationshiop with noise
x = np.arange(10) + 1
y = 0.45 * x + 3.38 + 0.15*np.random.randn(len(x))

# Print out data
for i in xrange(len(x)):
	print "{0:2d}  {1:4.2f}".format(x[i], y[i])

# Plot the data
plt.plot(x, y, 'ob')
plt.show()
