Skip to content

Commit

Permalink
relaxed unequal scaling of user parameters to a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodore Lindsay committed Nov 29, 2017
1 parent ab8469d commit 0466665
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion figurefirst/svg_to_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ def __init__(self, layout_filename, autogenlayers=True,make_mplfigures = False,
# it is probably best to assert that the a.r's are the same
# for now
#assert self.layout_user_sx == self.layout_user_sy
assert (np.abs(self.layout_user_sx[0] - self.layout_user_sy[0]) < figurefirst_user_parameters.rounding_tolerance) # rounding errors are a bitch
if np.abs(self.layout_user_sx[0] - self.layout_user_sy[0]) > figurefirst_user_parameters.rounding_tolerance:
warnings.warn('The scaling defined by the scaling of the user units in x and y are different. Results may be unexpected')
if make_mplfigures:
self.make_mplfigures()

Expand Down

0 comments on commit 0466665

Please sign in to comment.