blob: 1d1177920551f6b65ad794aa3a38bf7a6bb3a823 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
from data import trials
print('\\vtable{')
table = ['Dimensions (in)', 'Pit Depth (cm)', 'Pit Width (cm)', 'Nearest Neighbor (cm)',''];
lastsize = 0;
for trial in trials:
size = trial.size
table[0] += '&\\multispan{' + str(len(trial.pits)) + '}\\vfil\\line{\\hfil' + '$\\times$'.join([str(el) for el in size]) + '\\hfil}\\vfil\\hrule'
nei = trial.nearest_neighbor()
for pitind in range(len(trial.pits)):
pit = trial.pits[pitind]
table[1] += '&' + '%.1f' % pit.depth
table[2] += '&' + '%.1f' % pit.diam
table[3] += '&' + '%.2f' % nei[pitind]
print('\\cr\\noalign{\\vrule}\n'.join(table) + '}', end='');
|