Skip to content

Commit

Permalink
Code for matplotlib bar chart added (but not using it, it's too slow)
Browse files Browse the repository at this point in the history
  • Loading branch information
vad committed Jul 13, 2009
1 parent 3471d8a commit 7aa13c7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,32 @@ def set_weighted_indegree(g):
else:
f = open('%swiki-%s-hist.dat' % (lang, date), 'w')

all_list = sorted(sysops_list + nogrp_list + burs_list + stewards_list + founders_list + bots_list, reverse=True)
##from pylab import figure, show, ioff, ion
##import matplotlib
##import matplotlib.pyplot as plt

##fig = figure(facecolor='white', edgecolor='white')
##ax = fig.add_subplot(111) # a plot with a row and a column

##isinstance(fig, matplotlib.figure.Figure)
##isinstance(ax, matplotlib.axes.Axes)

##ax.set_yscale('log')
##ax.set_xscale('log')

##degrees = [x[0] for x in all_list]
##d_colors = { 1: '#BE1E2D', 2: '#EE8310', 3: 'green', 4: '#92D5EA', 5: 'violet', 6: '#666699'}
##colors = [d_colors[x[1]] for x in all_list]

##ioff()
##ax.bar(range(len(degrees)), degrees, color=colors, edgecolor='white', width=1., log=True)
##ax.set_ylim(0.9, max(indegrees))
##ion()

##show()


for indegree, grp in sorted(sysops_list + nogrp_list + burs_list + stewards_list + founders_list + bots_list, reverse=True):
for i in range(grp - 1):
print >>f, 0,
Expand Down
2 changes: 1 addition & 1 deletion hist.gnuplot
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#set style fill solid border -1
set log xy

set terminal png size 2000, 1200
set terminal png butt size 2000, 1200 x000000 xffffff x0000ff xff0000
set output "hist.png"

#plot 'hist.dat' using 1 w p t 'Common', '' using 2 w p t 'Sysop'
Expand Down

0 comments on commit 7aa13c7

Please sign in to comment.