From 74ec6692fe5fba5ade04d874704fc73771f3be88 Mon Sep 17 00:00:00 2001 From: philippjfr Date: Mon, 12 May 2014 13:37:43 +0100 Subject: [PATCH] Fixed plotting aspect ratio if lbrt is None --- dataviews/plots.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dataviews/plots.py b/dataviews/plots.py index 3cbe773a8c..745d77a2ec 100644 --- a/dataviews/plots.py +++ b/dataviews/plots.py @@ -162,11 +162,11 @@ def _axis(self, axis, title=None, xlabel=None, ylabel=None, if b == t: t += 1. # Arbitrary y-extent if zero range axis.set_ylim((b, t)) - if self.aspect == 'square': + if self.aspect == 'square' and lbrt: xrange = lbrt[2] - lbrt[0] yrange = lbrt[3] - lbrt[1] axis.set_aspect(xrange/yrange) - elif self.aspect is not None: + elif self.aspect not in [None, 'square']: axis.set_aspect(self.aspect) if xticks: