]> git.donarmstrong.com Git - neurodebian.git/commitdiff
Safeguard.
authorMichael Hanke <michael.hanke@gmail.com>
Wed, 18 May 2011 10:58:04 +0000 (06:58 -0400)
committerMichael Hanke <michael.hanke@gmail.com>
Wed, 18 May 2011 10:58:04 +0000 (06:58 -0400)
survey/makestats

index af91aa19b2ee7e35aa6da04228df9f09f01d5d7c..68f605d0bcd2ac9fa70d0a7ed7504ee7e273be1b 100755 (executable)
@@ -255,7 +255,8 @@ def mkpic_submissions_per_key(db, destdir, key, title, sortby='name',
                             multiple=False):
     counts = db.get_counts(key)
     pl.figure(figsize=(6.4, (len(counts)-2) * 0.4 + 2))
-    tmargin = .8/len(counts)
+    if not len(counts): tmargin = 0.4
+    else: tmargin = .8/len(counts)
     if tmargin > 0.3: tmargin = 0.3
     pl.subplots_adjust(left=0.03, right=0.97, top=1-tmargin, bottom=tmargin)
     pl.title(title)