Skip to content
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

Fix the pixels/bin calculation #1292

Merged
merged 1 commit into from
Oct 1, 2023
Merged

Fix the pixels/bin calculation #1292

merged 1 commit into from
Oct 1, 2023

Conversation

argilo
Copy link
Member

@argilo argilo commented Oct 1, 2023

Partially addresses #1282.

At many zoom levels, there's an empty pixel at the right hand side of the plot & waterfall displays. As far as I can tell, this happens because the xScale variable, which represents the number of pixels per bin, uses the wrong figure (w-1) for the width of the display. (The display is actually w pixels wide.) As a result, the subsequent xmin and xmax calculations try to map the bins onto a w-1 pixel display, and the rightmost pixel is often left empty (except when rounding error happens to push it one pixel larger). Changing the number of pixels to w fixes the problem.

@argilo argilo added the bug label Oct 1, 2023
Copy link
Contributor

@willcode willcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment above that line (second sentance) can go too, then.

@argilo
Copy link
Member Author

argilo commented Oct 1, 2023

Done.

@willcode
Copy link
Contributor

willcode commented Oct 1, 2023

I think I'd compensated for +/- 1 in a bunch of places. Hopefully, you've simplified it all now.

@argilo argilo merged commit 40bef4f into master Oct 1, 2023
22 checks passed
@argilo argilo deleted the fix-right-pixel branch October 1, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants