summaryrefslogtreecommitdiffstats
path: root/plot.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-05 17:01:05 +0000
committerDavid Robillard <d@drobilla.net>2011-09-05 17:01:05 +0000
commit968b903a84465ba7c36b45dea809c806b3bd3a16 (patch)
treeecc8aaa999ac5183cc7e9e43924ad1c18816dcfa /plot.py
parent7f70df52fafb1bbb01926ef0732f80aeb3ef90c2 (diff)
downloadzix-968b903a84465ba7c36b45dea809c806b3bd3a16.tar.gz
zix-968b903a84465ba7c36b45dea809c806b3bd3a16.tar.bz2
zix-968b903a84465ba7c36b45dea809c806b3bd3a16.zip
Benchmark iteration and deletion.
Better error detection. git-svn-id: http://svn.drobilla.net/zix/trunk@5 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'plot.py')
-rwxr-xr-xplot.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/plot.py b/plot.py
index ff4f438..78ba4d4 100755
--- a/plot.py
+++ b/plot.py
@@ -1,17 +1,24 @@
#!/usr/bin/env python
-import sys
+import math
import os
+import sys
from matplotlib import pyplot
from matplotlib.pyplot import *
-for i in range(len(sys.argv) - 1):
+pyplot.subplots_adjust(wspace=0.2, hspace=0.2)
+
+n_plots = len(sys.argv) - 1
+for i in range(n_plots):
filename = sys.argv[i+1]
file = open(filename, 'r')
- pyplot.subplot(2, 1, i + 1)
- pyplot.xlabel('Number of Elements')
+ math.ceil
+ pyplot.subplot(math.ceil(math.sqrt(n_plots)),
+ math.ceil(math.sqrt(n_plots)),
+ i + 1)
+ pyplot.xlabel('# Elements')
pyplot.ylabel('Time (s)')
ns = []