In [1]:
# %load_ext asmarkdown
In [2]:
%%asmarkdown
print '''
* what does this do?
* what does that do?
'''
In [3]:
nwalks = 5000
nsteps = 1000
draws = np.random.randint(0, 2, size=(nwalks, nsteps)) * 2 - 1
draws
Out[3]:
In [14]:
walk = np.cumsum(draws, 1)
walk
Out[14]:
In [25]:
x = np.arange(0, nsteps)
for i in range(0,10):
plt.plot(x, walk[i])
In [5]:
import matplotlib.image as mpimg
In [6]:
img=mpimg.imread('stinkbug.png')
In [7]:
imgplot = plt.imshow(img)
In [8]:
lum_img = img[:,:,0]
imgplot = plt.imshow(lum_img)
In [9]:
plt.imshow(lum_img, cmap="hot")
plt.colorbar()
Out[9]:
In [10]:
data = plt.hist(lum_img.ravel(), bins=256, range=(0.0, 1.0), fc='k', ec='k')
In [11]:
imgplot = plt.imshow(lum_img, clim=(0.0, 0.7))