-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Feature request: zsmooth parameter for Heatmapgl #2924
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
Comments
We're actually thinking about deprecating Could you tell us why you're using heatmapgl? Thank you! |
For larger images, e.g. a megapixel, the webgl implementation seems to perform better in my jupyterlab sessions, hovering and especially zoom is way slower than in the non-webgl heatmap. Reaction times of UI elements in general seem to be better in the webgl version. Example code for a notebook:
Heatmapgl:
Normal Heatmap:
I use plotly 3.1.1 and jupyterlab 0.33.11 from the anaconda distribution. |
I notice a strange interpolation effect in heatmapgl, that makes it look as though there's a NW/SE correlation between neighboring data points. If I zoom in on https://codepen.io/etpinard/pen/mojEWY?editors=111 (which has totally random z, no correlation) I see: |
Hi, is there any chance that the interpolation will be fixed, e.g. removed or possibile to change for heatmapgl? |
I would like to use the heatmapgl fot the same reason of #2924 (comment). I have an insane matrix of detector to update in real time so offloading the work to a GPU would be very important. |
Scientists I'm working with are finding similar issues with the heatmapgl implementation -- they require a discretised version rather than a smoothed one as their data is recorded discretely. We have also found that the non-gl implementation doesn't work well with large datasets (the datasets are not excessively large and the heatmap renders ok but panning and zooming is too slow to update). The gl version of the heatmap works beautifully except for the smoothing issue. I have implemented a discretised heatmap solution that uses a fork of Mikola Lysenko's original gl-heatmap2d code that is sourced in plotly. I didn't want to implement huge changes to the plotly source code as a first step, so I didn't implement a zsmooth option in the code. Instead, my implementation requires our scientists to npm link to my discretised version of the code in their stack rather than the originally sourced package. There is a minor edit to the plotly heatmapgl trace to increase the margins (as an extra patch is required in both dimensions for the discretised version). My discretised version of the gl-heatmap2d code is here: My modification to the plotly code can be found in my forked branch here: The edits I made to the plotly code (which can really be considered a bit of a hack and not an optimally implemented solution) are described here: I am not experienced with contributing to open source software so I would need advice on how best to approach implementing this as an optimal solution. I would very much appreciate any help you can provide. |
@antoinerg is this related to #4842 or totally different? |
(The relationship I'm thinking of here would be: if we implement #4842 would we get |
Hi, just to clarify a bit more for me: in #4842 you talk about images. Would this then also work for a 2d array such as a detector image (similarly to what matplotlib is doing with imshow), or only for actual image formats? |
Sorry, just read all the other issues and saw that this is the hole point of this feature... |
So I tried out the current implementation of using the image trace as an alternative and it is unfortunately still way to slow. For it to be usable, there needs to be a responsive interaction with image dimensions of 2048 x 2048 px... |
Yes, we have not yet implemented #4842 so there is no change in performance yet :) |
Ah ok, thank you for the information! Will there be a webgl implementation? I just tried out to use the image as a a texture on a plane in three.js and the performance is really really good in terms of interaction (zooming, panning) and also plotting speed. |
At the moment the only item on our roadmap is speeding up (edited to remove mention of sponsorship, as @ordiology has most of the solution built already, and it mostly needs integration) |
Ok, thank you. This sounds good. I am looking forward to the new improved image trace. With webgl version I did not mean the zsmooth for heatmapgl, but rather for "image", such as an "imagegl". It should be possible to just have a plane in webgl where the image is attached as texture and thus, benefit from the webgl speed. I also do not think, that heatmapgl can be made fast enough for this type of application. |
OK, but that's what the current issue is about :) If you have other ideas or requests, let's please open up a separate issue for discussion. |
Closed via #4953. |
To anyone still subscribed to this issue: we'd like to understand the situations in which We are considering removing |
Sorry for the late reply @nicolaskruchten, but I can provide a little info about the limitations we found with We find the |
I have to state that I have given up to even use heatmapgl for interaction of large image data typically acquired at large scientific instruments, since this is still too slow. My goal was to have as fast interaction possibility as for example with pyqtgraph in desktop software. We do need not just panning and zooming of the image, but also fast change of colorscale (e.g. actually replotting). After a LOT of tinkering, I have come up with my own solution where i map the data to an image THREE.js image texture (this of course implies evenly spaced pixels) and use this within webglcanvas in plain d3. To my surprise this turned out to be even better performing than pyqtgraph. |
the zsmooth parameter seems to not be implemented in Heatmapgl , while it is in Heatmap.
Could you add this in the future?
By default Heatmapgl seems to use interpolation while I do like to turn it off.
The text was updated successfully, but these errors were encountered: