From 0bface897743f4bed9035d00ae0e0b032d689a64 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Thu, 21 Jan 2021 13:58:45 -0500 Subject: made graphs and tables a little more accurate --- py/data2.py | 2 +- py/deathtable2.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'py') 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') -- cgit