Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions fastplotlib/graphics/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand All @@ -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])

Expand All @@ -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
Expand Down Expand Up @@ -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)

Expand Down