aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2021-01-21 13:58:45 -0500
committerHolden Rohrer <hr@hrhr.dev>2021-01-21 13:58:45 -0500
commit0bface897743f4bed9035d00ae0e0b032d689a64 (patch)
treee5e97160af23a0eac90cfdd4201e9930da5eaa92
parent1901753f1555beae9acf4cd65c3c3306ffa293ec (diff)
made graphs and tables a little more accurate
-rw-r--r--py/data2.py2
-rw-r--r--py/deathtable2.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/py/data2.py b/py/data2.py
index a073f4b..cef333d 100644
--- a/py/data2.py
+++ b/py/data2.py
@@ -42,7 +42,7 @@ class Trial:
if self.method == 'obstacles':
for obstacle in self.fake:
plt.fill(*obstacle.unzip())
- plt.xlabel('%s (dimension %dx%dcm)' % (fancy[self.method], self.size[0], self.size[1]))
+ plt.xlabel('%s (dimension %dx%din)' % (fancy[self.method], self.size[0], self.size[1]))
if save:
plt.savefig('%s-%dx%d.png'%(self.method,self.size[0],self.size[1]),
bbox_inches='tight')
diff --git a/py/deathtable2.py b/py/deathtable2.py
index ec0f171..86fe5f8 100644
--- a/py/deathtable2.py
+++ b/py/deathtable2.py
@@ -7,6 +7,6 @@ Nearest Neighbor (avg) & Width (avg) & Depth (avg)\\cr\\tabrule')
for trial in trials:
print('& '.join(['$'+'\\times'.join([str(el) for el in trial.size])+'$',
fancy[trial.method], str(trial.recl), str(trial.dead),
- str(len(trial.pits)), '%.2f' % mean(trial.nearest_neighbor()),
- '%.2f' % mean([pit.diam for pit in trial.pits]),
- '%.2f' % mean([pit.depth for pit in trial.pits])])+'\\cr\\tabrule')
+ str(len(trial.pits)), '%.2fin' % mean(trial.nearest_neighbor()),
+ '%.2fcm' % mean([pit.diam for pit in trial.pits]),
+ '%.2fcm' % mean([pit.depth for pit in trial.pits])])+'\\cr\\tabrule')