From: Michael Hanke Date: Wed, 18 May 2011 10:58:04 +0000 (-0400) Subject: Safeguard. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=fae94a9334a2a679a7cb58facf80955a814f9893;p=neurodebian.git Safeguard. --- diff --git a/survey/makestats b/survey/makestats index af91aa1..68f605d 100755 --- a/survey/makestats +++ b/survey/makestats @@ -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)