Skip to content

Commit

Permalink
Fixed plotting aspect ratio if lbrt is None
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed May 12, 2014
1 parent 042a025 commit 74ec669
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dataviews/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 74ec669

Please sign in to comment.