Permalink
Browse files

changed histogram function name to more customized and added new simi…

…lar function
  • Loading branch information...
ei-grad committed Dec 8, 2011
1 parent b527e54 commit c477d8ef602235fefd4cc3b6fb42448c02980ae6
Showing with 9 additions and 1 deletion.
  1. +9 −1 plots.py
View
@@ -45,7 +45,15 @@ def party_split(data, party, proc):
return d1, d2
-def plot2(d1, d2, dp=1000):
+def ppl_by_uic_party_percent_hist1(d, dp=1000):
+ for i in range(1, 7):
+ y, x = np.histogram(d[:,i] * 100 / d[:,1:].sum(axis=1), dp, (0, 100),
+ weights=d[:,i])
+ plt.plot(x[:-1], y)
+ plt.show()
+
+
+def ppl_by_uic_party_percent_hist2(d1, d2, dp=1000):
plt.subplot(2, 1, 1)
for i in range(1, 7):

0 comments on commit c477d8e

Please sign in to comment.