Thanks to visit codestin.com
Credit goes to github.com

Skip to content

image selector and heatmap linalg fixes #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2023
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