In [41]:
%pylab inline
import numpy as np
# do the math and plot it
x = np.arange(-2 * math.pi, 2 * math.pi, 0.01)
y = np.sin(x)
z = np.cos(x)
plt.plot(x, y)
plt.plot(x, z)
# set the graph boundaries
plt.xlim(-4.1, 4.1)
plt.ylim(-1.1, 1.1)
# show the grid and origin
plt.grid(True)
plt.axhline(0, color='black')
plt.axvline(0, color='black')
plt.axhline(math.pi/2, color='red')
plt.figure(figsize=(4, 1))
plt.show()
In [34]:
import pysal
shp = pysal.open("10740.shp")
poly = shp.next()
In [38]:
len(shp)
Out[38]:
In [ ]: