Skip to content
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

Add support for iheatmap!() #25

Merged
merged 9 commits into from
Feb 4, 2024

Conversation

ConnectedSystems
Copy link
Contributor

@ConnectedSystems ConnectedSystems commented Jan 13, 2024

Add support for overlaying heatmaps on top of each other (adding to an existing axis).
I've also reorganised the code as discussed in #22 (comment)

Closes #24

May close #22

There are some issues - occasionally the image will tear when panning/zooming, but not sure what causes it. It may be a Makie issue.

Example using WGLMakie:

using WGLMakie
using InteractiveViz
using InteractiveViz.Demo

WGLMakie.activate!(; framerate=20)

# Example using a function
# iheatmap(mandelbrot, -2, 0.66, -1, 1)

# Example using a large in-memory array
f = iheatmap(zeros(10_000, 10_000))
iheatmap!(f, rand(10_000, 10_000); alpha=0.1)

f

I have not tested with a disk-based array/matrix - hypothetically it should work.

Note: Every now and then, a warning will be raised.

Error in window event callback
exception =

All non scalars need same length, Found lengths for each argument: (5, 3, 1), (Vector{Makie.GlyphCollection}, Vector{Point{3, Float32}}, Quaternion{Float64})

The cause of this is already known MakieOrg/Makie.jl#2473 and is not caused by/related to the changes in this PR.

@ConnectedSystems ConnectedSystems mentioned this pull request Jan 13, 2024
@marianoarnaiz
Copy link

Hi. Thanks this is very helpful. :)
I still cannot find how to pass a new pooling function to iheatmap, any example around?

@mchitre
Copy link
Member

mchitre commented Jan 15, 2024

Hi. Thanks this is very helpful. :) I still cannot find how to pass a new pooling function to iheatmap, any example around?

Currently the pooling functionality is not user-facing. It shouldn't be hard to make it available to the user, and I have a test implementation, but it needs some testing before I can PR it. Perhaps this weekend...

@marianoarnaiz
Copy link

Hi. Thanks this is very helpful. :) I still cannot find how to pass a new pooling function to iheatmap, any example around?

Currently the pooling functionality is not user-facing. It shouldn't be hard to make it available to the user, and I have a test implementation, but it needs some testing before I can PR it. Perhaps this weekend...

HI again.
I am sorry for the trouble. I do not mind copying the #master and making a change for myself. My data is not congruent with the current pooling. I did this for the previous version. I modded to prject for me, but the new version is quite different and I do not understand how the pooling is asing for the iheatmap. Could you let me know where is decided and I can change it.

You can see my post here

https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/27

from Mar 2023

Copy link
Member

@mchitre mchitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good to me.

My only nitpick is that your editing has now created a mix of 2-space indents and 4-space indents in the code, which is confusing. While I don't mind either option, given that the code base currently uses 2-space indents, would you mind switching to those for this project please? It'll also get rid of lots of unnecessary clutter in the diffs on this PR, making it easier to review for real code changes.

@ConnectedSystems
Copy link
Contributor Author

Okay, standardized to two-space indentation.

@mchitre
Copy link
Member

mchitre commented Feb 4, 2024

LGTM, thanks!

@mchitre mchitre merged commit 65695c5 into org-arl:master Feb 4, 2024
@ConnectedSystems ConnectedSystems deleted the heatmap-overlay branch February 4, 2024 08:58
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.

iheatmap! Add support for heatmap! to support opacity / blending
3 participants