From 361247915a5f5baa95ce76f419dd4656ff765f5a Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Wed, 24 May 2023 00:38:03 -0400 Subject: [PATCH] image selector and heatmap linalg fixes --- fastplotlib/graphics/image.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fastplotlib/graphics/image.py b/fastplotlib/graphics/image.py index 8773569c0..5adfde338 100644 --- a/fastplotlib/graphics/image.py +++ b/fastplotlib/graphics/image.py @@ -122,7 +122,7 @@ def _get_linear_selector_init_args(self, padding: float, **kwargs): padding = int(data.shape[1] * 0.15) if axis == "x": - offset = self.position.x + offset = self.position_x # x limits, number of columns limits = (offset, data.shape[1]) @@ -135,14 +135,14 @@ def _get_linear_selector_init_args(self, padding: float, **kwargs): position_y = data.shape[0] / 2 # need y offset too for this - origin = (limits[0] - offset, position_y + self.position.y) + origin = (limits[0] - offset, position_y + self.position_y) # endpoints of the data range # used by linear selector but not linear region # padding, n_rows + padding end_points = (0 - padding, data.shape[0] + padding) else: - offset = self.position.y + offset = self.position_y # y limits limits = (offset, data.shape[0]) @@ -154,7 +154,7 @@ def _get_linear_selector_init_args(self, padding: float, **kwargs): position_x = data.shape[1] / 2 # need x offset too for this - origin = (position_x + self.position.x, limits[0] - offset) + origin = (position_x + self.position_x, limits[0] - offset) # endpoints of the data range # used by linear selector but not linear region @@ -463,8 +463,8 @@ def __init__( img.row_chunk_index = chunk[0] img.col_chunk_index = chunk[1] - img.position.set_x(x_pos) - img.position.set_y(y_pos) + img.position_x = x_pos + img.position_y = y_pos self.world_object.add(img)