-
Notifications
You must be signed in to change notification settings - Fork 187
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
A raster/2d function plot mark #984
Comments
I like it. I think we should use foreignObject instead of toDataURL though (even if it currently breaks downloads on Observable; we could add a fix for that to downloading if we want to). I wonder if using fillRect would be faster or slower than putImageData. I think we’ll want a different option than resolution, but I’m not sure exactly what… For the current functionality I would rename the option to devicePixelRatio (or maybe pixelRatio) but I wonder if it should feel more like Plot.density where there’s an underlying grid of some resolution (that’s not necessarily 1:1 with pixels). But maybe starting with pixelRatio is fine and I’m overthinking. It’s also interesting to think how a WebGL shader mark might function. |
A while ago while playing around with my own density mark (with liberal help from Fil) I ran into an Safari bug where the foreignObject would not scale properly with the SVG. You can see an example here – open it in Safari and increase the font size. Performance should be better than toDataURL, but I never figured out a workaround for the bug. |
Fixed in #1196. |
https://observablehq.com/@observablehq/plot-heatmap-984
see comment in https://observablehq.com/@observablehq/javascript-replacements-for-python-data-science-tools#comment-7873045d922f909f
The text was updated successfully, but these errors were encountered: