-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Setting expand to false for Image #5351
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5351 +/- ##
=======================================
Coverage 88.07% 88.07%
=======================================
Files 301 301
Lines 61957 61959 +2
=======================================
+ Hits 54567 54569 +2
Misses 7390 7390
Continue to review full report at Codecov.
|
@@ -1547,6 +1547,9 @@ class rasterize(AggregationOperation): | |||
] | |||
|
|||
def _process(self, element, key=None): | |||
if isinstance(element, Image): | |||
self.p.expand = False |
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.
A comment about why this is done is needed before merging into master.
Hmm. It's good that this fixes the symptom, but I agree it seems like a workaround, because |
This workaround works because it avoids setting holoviews/holoviews/operation/datashader.py Lines 145 to 154 in 2d2b728
Same thing with I tried always calculating the range, but this made the tests fail. |
I've discussed this with @hoxbro and I see a number of overlapping issues:
Once we are clear on these issues, then it should become more obvious what the correct fix is... Edit: I'm remembering a bit more now, I believe that the black for NaNs comes back to an old convention in datashader, in which case matching that for missing values made some sense...but transparent pixels are an equally valid and useful choice! Do you agree @jbednar ? |
I agree. I don't remember all the details, but would have thought we always preferred transparent for NaN, albeit with black as the color, which wouldn't normally be visible. |
Superseded by #5767 |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #5358
To be honest, this fix is more of a workaround for the problem than a fix. But the complexity of the the holoviews pipelines makes it hard for me to see when
self.p.expand
is set toTrue
, even thoughregrid.expand
defaults to False. Suggestions are welcome.With this change the notebook example outputs this:
screenrecord-2022-07-07_17.48.20.mp4
The example in the notebook can be reduced to this MRE:
Before this fix:
screenrecord-2022-07-07_17.54.46.mp4
After this fix:
screenrecord-2022-07-07_17.52.09.mp4