aboutsummaryrefslogtreecommitdiff
path: root/py/boxplot.py
blob: be1c0244178d2f37bc58c95f508c6c2eadfc342d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from data2 import trials
import matplotlib.pyplot as plt

vecs = []
names = []
for trial in trials:
    vecs.append(trial.nearest_neighbor())
    names.append(str(trial))
    
plt.boxplot(vecs, labels=names)
plt.title('Nearest Neighbor for Each Pit in Different Trials')
plt.ylabel('Distance to Nearest Neighbor (cm)')
plt.savefig('boxplot.png', bbox_inches='tight')