<reponame>michel94/betweeness
import matplotlib.pyplot as plt

results = {
0.01: {628208, 796010, 185467, 183014, 804896, 184408, 182324, 736495, 966407, 529195, 943384, 185912, 433366, 186311, 566458, 952314, 945368, 856661, 716769, 576879},
0.02: {628208, 796010, 185467, 183014, 184408, 628206, 736495, 185912, 943384, 566458, 186311, 182324, 856661, 970126, 801940, 804896, 123149, 828079, 186229, 952314},
0.03: {628208, 796010, 185467, 183014, 716772, 433366, 184408, 182324, 566458, 736495, 943384, 186311, 966407, 628206, 529195, 952314, 828079, 945368, 856661, 801940},
0.04: {628208, 796010, 185467, 183014, 433366, 184408, 566458, 182324, 943384, 804896, 736495, 716772, 970126, 186311, 856661, 952314, 628206, 966407, 939131, 828079},
0.05: {628208, 796010, 185467, 183014, 433366, 184408, 182324, 943384, 970126, 566458, 628206, 804896, 736495, 529195, 952314, 186311, 828079, 966407, 801940, 856661},
0.06: {628208, 796010, 433366, 185467, 183014, 184408, 716772, 943384, 736495, 566458, 804896, 970126, 529195, 186311, 628206, 182324, 801940, 828079, 856661, 952314},
0.07: {628208, 796010, 185467, 183014, 433366, 716772, 184408, 182324, 943384, 566458, 804896, 628206, 736495, 186311, 970126, 828079, 123149, 952314, 939131, 529195},
0.08: {628208, 796010, 185467, 183014, 433366, 716772, 184408, 628206, 566458, 943384, 182324, 736495, 804896, 186311, 828079, 970126, 801940, 856661, 969614, 939131},
0.09: {628208, 796010, 185467, 433366, 183014, 184408, 628206, 943384, 736495, 182324, 186311, 804896, 566458, 801940, 970126, 828079, 527583, 666045, 952314, 716772},
0.1:  {628208, 796010, 185467, 183014, 433366, 184408, 182324, 566458, 628206, 943384, 185912, 736495, 186311, 804896, 970126, 716772, 945368, 828079, 801940, 966407},
0.2:  {628208, 796010, 185467, 433366, 183014, 184408, 943384, 566458, 628206, 736495, 716772, 182324, 804896, 970126, 185912, 186311, 529195, 801940, 828079, 666045},
0.3:  {628208, 796010, 185467, 183014, 433366, 184408, 566458, 943384, 736495, 804896, 186311, 970126, 628206, 716772, 182324, 185912, 529195, 801940, 828079, 856661},
0.4:  {628208, 796010, 185467, 183014, 433366, 184408, 943384, 566458, 736495, 182324, 628206, 716772, 970126, 186311, 804896, 828079, 801940, 185912, 952314, 939131},
0.5:  {628208, 796010, 185467, 433366, 183014, 184408, 943384, 716772, 566458, 628206, 736495, 182324, 970126, 804896, 186311, 828079, 856661, 952314, 666045, 939131},
0.6:  {628208, 796010, 185467, 183014, 433366, 184408, 943384, 716772, 736495, 182324, 566458, 970126, 804896, 628206, 186311, 185912, 801940, 828079, 856661, 939131},
0.7:  {628208, 796010, 185467, 433366, 183014, 184408, 943384, 566458, 716772, 736495, 182324, 804896, 186311, 628206, 970126, 185912, 801940, 856661, 828079, 952314},
0.8:  {628208, 796010, 185467, 183014, 433366, 184408, 566458, 943384, 736495, 182324, 628206, 716772, 804896, 186311, 970126, 185912, 828079, 856661, 666045, 529195},
0.9:  {628208, 796010, 185467, 183014, 433366, 184408, 943384, 716772, 566458, 736495, 804896, 182324, 628206, 186311, 970126, 801940, 828079, 856661, 185912, 666045},
  1:  {628208, 796010, 185467, 183014, 433366, 184408, 943384, 566458, 736495, 716772, 804896, 182324, 186311, 628206, 970126, 185912, 801940, 828079, 666045, 952314}
}

comp = results[1]
plot = []

count = {}
for r in sorted(results.items()):
	count[r[0]] = len(r[1] & comp)
	plot.append((r[0], count[r[0]]))

for i in sorted(count.items()):
	print(i[0], i[1])


plt.plot(*zip(*plot))
x1, x2, y1, y2 = plt.axis()
plt.axis((x1, x2, 0, 30))
plt.show()

import matplotlib.pyplot as plt

results = {
0.01: {628208, 796010, 185467, 183014, 804896, 184408, 182324, 736495, 966407, 529195, 943384, 185912, 433366, 186311, 566458, 952314, 945368, 856661, 716769, 576879},
0.02: {628208, 796010, 185467, 183014, 184408, 628206, 736495, 185912, 943384, 566458, 186311, 182324, 856661, 970126, 801940, 804896, 123149, 828079, 186229, 952314},
0.03: {628208, 796010, 185467, 183014, 716772, 433366, 184408, 182324, 566458, 736495, 943384, 186311, 966407, 628206, 529195, 952314, 828079, 945368, 856661, 801940},
0.04: {628208, 796010, 185467, 183014, 433366, 184408, 566458, 182324, 943384, 804896, 736495, 716772, 970126, 186311, 856661, 952314, 628206, 966407, 939131, 828079},
0.05: {628208, 796010, 185467, 183014, 433366, 184408, 182324, 943384, 970126, 566458, 628206, 804896, 736495, 529195, 952314, 186311, 828079, 966407, 801940, 856661},
0.06: {628208, 796010, 433366, 185467, 183014, 184408, 716772, 943384, 736495, 566458, 804896, 970126, 529195, 186311, 628206, 182324, 801940, 828079, 856661, 952314},
0.07: {628208, 796010, 185467, 183014, 433366, 716772, 184408, 182324, 943384, 566458, 804896, 628206, 736495, 186311, 970126, 828079, 123149, 952314, 939131, 529195},
0.08: {628208, 796010, 185467, 183014, 433366, 716772, 184408, 628206, 566458, 943384, 182324, 736495, 804896, 186311, 828079, 970126, 801940, 856661, 969614, 939131},
0.09: {628208, 796010, 185467, 433366, 183014, 184408, 628206, 943384, 736495, 182324, 186311, 804896, 566458, 801940, 970126, 828079, 527583, 666045, 952314, 716772},
0.1:  {628208, 796010, 185467, 183014, 433366, 184408, 182324, 566458, 628206, 943384, 185912, 736495, 186311, 804896, 970126, 716772, 945368, 828079, 801940, 966407},
0.2:  {628208, 796010, 185467, 433366, 183014, 184408, 943384, 566458, 628206, 736495, 716772, 182324, 804896, 970126, 185912, 186311, 529195, 801940, 828079, 666045},
0.3:  {628208, 796010, 185467, 183014, 433366, 184408, 566458, 943384, 736495, 804896, 186311, 970126, 628206, 716772, 182324, 185912, 529195, 801940, 828079, 856661},
0.4:  {628208, 796010, 185467, 183014, 433366, 184408, 943384, 566458, 736495, 182324, 628206, 716772, 970126, 186311, 804896, 828079, 801940, 185912, 952314, 939131},
0.5:  {628208, 796010, 185467, 433366, 183014, 184408, 943384, 716772, 566458, 628206, 736495, 182324, 970126, 804896, 186311, 828079, 856661, 952314, 666045, 939131},
0.6:  {628208, 796010, 185467, 183014, 433366, 184408, 943384, 716772, 736495, 182324, 566458, 970126, 804896, 628206, 186311, 185912, 801940, 828079, 856661, 939131},
0.7:  {628208, 796010, 185467, 433366, 183014, 184408, 943384, 566458, 716772, 736495, 182324, 804896, 186311, 628206, 970126, 185912, 801940, 856661, 828079, 952314},
0.8:  {628208, 796010, 185467, 183014, 433366, 184408, 566458, 943384, 736495, 182324, 628206, 716772, 804896, 186311, 970126, 185912, 828079, 856661, 666045, 529195},
0.9:  {628208, 796010, 185467, 183014, 433366, 184408, 943384, 716772, 566458, 736495, 804896, 182324, 628206, 186311, 970126, 801940, 828079, 856661, 185912, 666045},
  1:  {628208, 796010, 185467, 183014, 433366, 184408, 943384, 566458, 736495, 716772, 804896, 182324, 186311, 628206, 970126, 185912, 801940, 828079, 666045, 952314}
}

comp = results[1]
plot = []

count = {}
for r in sorted(results.items()):
	count[r[0]] = len(r[1] & comp)
	plot.append((r[0], count[r[0]]))

for i in sorted(count.items()):
	print(i[0], i[1])


plt.plot(*zip(*plot))
x1, x2, y1, y2 = plt.axis()
plt.axis((x1, x2, 0, 30))
plt.show()