In [ ]:
This is an iPython Notebook. This part is plain text.

In [1]:
print "I can put in Python code"


I can put in Python code

In [ ]:
And graphs:

In [4]:
%matplotlib inline

In [5]:
import matplotlib.pyplot as plt
import numpy as np

# Create x, randomly spaced between 0 to 20
x = np.linspace(0, 20, 1000)
y1 = np.sin(x)
y2 = np.cos(x)
# Plot the sin and cos functions
plt.plot(x , y1, "-g", label="sine")
plt.plot(x , y2, "-b", label="cos")
# The legend should be in the top right corner
plt.legend(loc="upper right")
# Limit the y axis to -1.5 to 1.5
plt.ylim(-1.5, 1.5)
plt.show()



In [7]:
pwd


Out[7]:
u'C:\\Documents and Settings\\tiwaris\\My Documents\\IPython Notebooks'

In [ ]: