-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
BUG : fix non-uniform grids in pcolorfast #4228
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
BUG : fix non-uniform grids in pcolorfast #4228
Conversation
We might also want to back-port this to color-overhaul. |
width = width * magnification | ||
height = height * magnification | ||
width = int(width * magnification) | ||
height = int(height * magnification) |
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.
Looks good to me. The only question it raises in my mind is whether after multiplication by magnification, a rounding operation would be better than truncation.
There is no point in backporting because the CXX version was handling the conversion to int. That also tells me there is no need to add a rounding step; what you have is fine. |
be0aed4
to
613ea28
Compare
@efiring rebased to fix conflict in tests. Re-reading this I read your suggestion about rounding, implemented it and then re-read your comment about not implementing it. I think the rounding is ok as this is determining how many pixels in the agg layer that the image will take up. Assuming travis passes, I think we should leave it as-is. |
well, of course travis is going to pass, we have no test coverage on this... |
Needs a rebase? Otherwise, it looks fine. |
613ea28
to
8e64eed
Compare
@efiring rebased. |
BUG : fix non-uniform grids in pcolorfast
Closes #4227
attn @mdboom @efiring This fixes the problem, but I have no idea why (I just looked at the c++ header, it wanted ints so I made sure it get ints).