diff --git a/brachiograph.py b/brachiograph.py index 300cffd..5db9951 100755 --- a/brachiograph.py +++ b/brachiograph.py @@ -161,7 +161,7 @@ def plot_file(self, filename="", wait=0, interpolate=10, bounds=None): with open(filename, "r") as line_file: lines = json.load(line_file) - self.plot_lines(lines=lines, wait=wait, interpolate=interpolate, bounds=bounds, flip=True) + self.plot_lines(lines=lines, wait=wait, interpolate=interpolate, bounds=bounds) def plot_lines(self, lines=[], wait=0, interpolate=10, rotate=False, flip=False, bounds=None): @@ -172,7 +172,7 @@ def plot_lines(self, lines=[], wait=0, interpolate=10, rotate=False, flip=False, if not bounds: return "Line plotting is only possible when BrachioGraph.bounds is set." - lines = self.rotate_and_scale_lines(lines=lines, bounds=bounds, flip=True) + lines = self.rotate_and_scale_lines(lines=lines, bounds=bounds, flip=flip) for line in tqdm.tqdm(lines, desc="Lines", leave=False): x, y = line[0] @@ -232,7 +232,7 @@ def rotate_and_scale_lines(self, lines=[], rotate=False, flip=False, bounds=None x = x / divider # scale x values to fit in our box width x = x + box_x_mid_point # shift x values so that they have the box x midpoint as their endpoint - if flip ^ rotate: + if flip: x = -x y = point[1]