Skip to content

plot: Heatmap#295

Closed
johannes-wolf wants to merge 1 commit into0.2.0from
colormap
Closed

plot: Heatmap#295
johannes-wolf wants to merge 1 commit into0.2.0from
colormap

Conversation

@johannes-wolf
Copy link
Member

@johannes-wolf johannes-wolf commented Oct 26, 2023

Implements a basic heatmap by drawing rects.
This is not a good solution for heatmaps with more than 15×15 tiles, as the performance is not as good for lots of rect calls.

@johannes-wolf johannes-wolf marked this pull request as draft October 26, 2023 13:44
To serve as base for colormap support in plots
@Enivex
Copy link

Enivex commented Nov 5, 2023

I posted this feature request, which would make this vastly more performant

typst/typst#2575

@johannes-wolf
Copy link
Member Author

I posted this feature request, which would make this vastly more performant

typst/typst#2575

Thank you! I think bitmap images are the only performant option for high-res heatmaps. Even if cetz would be fast enough, the PDF would be slow to render.

@johannes-wolf johannes-wolf added this to the 0.2.1 milestone Dec 3, 2023
@johannes-wolf johannes-wolf removed this from the 0.2.2 milestone Jan 17, 2024
@johannes-wolf johannes-wolf deleted the branch 0.2.0 May 18, 2024 11:52
@Enivex
Copy link

Enivex commented May 18, 2024

I guess this was blocked by typst/typst#2575 not yet being resolved?

@johannes-wolf
Copy link
Member Author

I've closed this by accident. Although, the current API is not that good for generating bitmaps, as it does not support raw pixel data. Having to convert to PNG/JPG first seems to be unnecessary complex.

@jamesrswift
Copy link
Contributor

Is this something a WASM plugin could deal with?

@johannes-wolf
Copy link
Member Author

johannes-wolf commented May 18, 2024

Is this something a WASM plugin could deal with?

Yes. A plug-in that takes a matrix and returns a bitmap would be cool (+ linear interpolations etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants