plt.rcParams['figure.figsize'] = [20, 5.5]
plt.boxplot(list(boids.values()), meanline=True, showmeans=True, whis=1., vert=False, widths=10.5,
boxprops={'linewidth': 3}, whiskerprops={'color':'black', 'linewidth': 3},
capprops={'linewidth': 3}, medianprops={'color':'black', 'linewidth': 2},
meanprops={'linewidth': 2}, flierprops={'markerfacecolor':'black',
'markeredgecolor': 'black',
'markersize': 10})
plt.title('ECE 4760 Boids Statistics', fontsize=24)
plt.xlabel('Number of Boids at 30fps', fontsize=24)
plt.yticks(fontsize=18, visible=False)
plt.xticks(fontsize=18, visible=True)
# X/y limits
plt.ylim([-(15+5*len(boids)), 16])
counter = 0
for i in list(boids.keys()):
plt.annotate(str(i)+': '+str(boids[i]),
xy=(boids[i], -(15+5*counter)), xytext=(boids[i],-(15+5*counter)), fontsize=8, alpha=.8)
plt.plot(boids[i]*numpy.ones(20), numpy.linspace(-(15+5*counter),-10,20),
'black', alpha=0.1)
counter += 1
plt.plot(list(boids.values()), -10*numpy.ones(len(list(boids.values()))), 'r.', alpha=0.5, markersize=15)
plt.savefig('Boid.png', bbox_inches='tight')
plt.show()