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

plt.figure(figsize=(16,9))

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')