-
Notifications
You must be signed in to change notification settings - Fork 5
Speedup rectangle mode for inspector plot #551
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
Changes from all commits
24dc0be
bb9afa1
c0adde9
3cb34e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -420,8 +420,8 @@ def test_rectangle_mode(): | |
|
|
||
| # This rectangle should select the bottom left corner of the data. | ||
| # Closing the rectangle by repeating the first point. | ||
| x = [-1, 21] | ||
| y = [-1, 310] | ||
| x = [-1, 19] | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This indicates a slight behaviour change: Which is the correct one is difficult to decide. When the operation we perform at the end is a sum, we would probably want to just rebin at the exact position of the rectangle edge, to include a fraction of an incomplete bin. I think it's fine for now, it's probably what most users would expect. |
||
| y = [-1, 290] | ||
| for xi, yi in zip(x, y, strict=True): | ||
| tool.click(x=xi, y=yi) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume the exclusive bounds are intentional?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that if we have a

maxvalue that falls exactly on a bin edge, the bin to the right of that won't be included?I think that's it what we want?
If I draw a rectangle exactly from 15 to 20, then I want the cells from the left edge at 15 to the right edge at 20 to be included.
I don't want the cell with a right edge at 15 and the one with left edge at 20 to be included. Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. We have made that decision for slicing, but I am not sure the same is valid for a UI and drawing a rectangle — a user might expect both bounds to be inclusive?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm quite sure this is what the users will expect.
In any case, I decided to just document the behaviour in the docstring with