# InteractiveViz - an interactive visualization toolkit for large datasets

**URL:** <https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878>\
**Category:** Package Announcements\
**Tags:** plotting\
**Created:** [June 6, 2020, 2:33pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878 "2020-06-06T14:33:24Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [February 17, 2023, 1:38am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/21 "2023-02-17T01:38:26Z")

</div>

Thanks @mchitre ! I will try this tomorrow.  
I am actually thinking that if the functions return the viz (ifigure) variable, then I might be able to mod the figure a bit more.

I am workting with some matrixes that have some 18e6 datapoints and eveything becomes very painfull. Your code reads and lets me explore the date very well. I am going to try to have a workaround so I can safe it as well 🙂

I am not very good with makie, but I am defilty interested in helping out with InteractiveViz

---

<div class="post-metadata">

**Author:** ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Post date:** [February 17, 2023, 5:00am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/22 "2023-02-17T05:00:35Z")

</div>

Yes, you can get access to the `scene` as shown above, and do all standard `Makie` stuff with it. Saving should be possible with `Makie` using `save()` on the `scene`, I believe (I have not used it).

---

<div class="post-metadata">

**Author:** ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)\
**Post date:** [February 17, 2023, 7:43am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/23 "2023-02-17T07:43:05Z")

</div>

If you have a function which operates on a Scene, then you can create an LScene and have it operate directly on `lscene.scene` instead.

`save("filename.extension", scene)` should work.

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [February 19, 2023, 6:38pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/24 "2023-02-19T18:38:46Z")

</div>

Could I get an example. InteractiveViz, creates the scene inside a function, but I need to be able to call it out… or save it to a variable before printing

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [February 20, 2023, 9:41am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/25 "2023-02-20T09:41:49Z")

</div>

> [@mchitre](#):
>
> `ifigure(hold=true).scene`

where can I add the let statement? if I add it to a code callin iViz it does not work ☹

---

<div class="post-metadata">

**Author:** ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Post date:** [February 23, 2023, 8:51am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/26 "2023-02-23T08:51:47Z")

</div>

Not sure I understand your question.

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [February 23, 2023, 4:10pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/27 "2023-02-23T16:10:23Z")

</div>

Hello @mchitre. I found a work around.  
I just modify the code to return the ifigure (viz) and then I can safe the plot. It is great 🙂

Could you help me a bit with iheatmap? I am trying to plot very noisy matrix. If I change the pooling to maximum I can see the positive picks but I need to saturate the color scale on the negative values. When I use the default mean, i can´t see my data.

 ![Screenshot 2023-02-23 at 5.08.11 PM](https://global.discourse-cdn.com/julialang/original/3X/7/d/7d9dea085aa08fdc4b5d103783df5dc3d6012155.jpeg)

Is there a way to change this so I can make my color scales symmetric?

---

<div class="post-metadata">

**Author:** ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Post date:** [February 26, 2023, 8:35am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/28 "2023-02-26T08:35:39Z")

</div>

What exactly do you mean by “symmetric” color scale? Maybe you can transform your data so that the colors are scaled in a way that you need?

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [March 5, 2023, 9:17am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/29 "2023-03-05T09:17:37Z")

</div>

I added a new Pooling to the code. The options of mean, maximum and minimum did not work for me :(. My data has too many peaks and is very noisy, but this is what I need to see. It is seismic data, and it is a mayhem hehe. I added an if to the code, it pooling=“seis” then the pooling function depends on the sign of the sum of the data:

> function heatmappool!(buf::AbstractMatrix, c::Canvas; pooling=mean)  
> data = c.datasrc.data  
> data === missing && return  
> pwidth, qwidth = size(data)  
> xylims = c.datasrc.xyrect  
> xpp = width(xylims) / pwidth  
> ypq = height(xylims) / qwidth  
> iwidth, jwidth = size(buf)  
> xyrect = c.xyrect  
> xpi = width(xyrect) / iwidth  
> ypj = height(xyrect) / jwidth  
> ppi = xpi / xpp  
> qpj = ypj / ypq  
> for j ∈ 1:jwidth  
> Threads.@threads for i ∈ 1:iwidth  
> p = ((i - 1) \* xpi + left(xyrect) - left(xylims)) / xpp  
> q = ((j - 1) \* ypj + bottom(xyrect) - bottom(xylims)) / ypq  
> p1 = round(Int, p - ppi/2) + 1  
> p2 = round(Int, p + ppi/2) + 1  
> q1 = round(Int, q - qpj/2) + 1  
> q2 = round(Int, q + qpj/2) + 1  
> if p1 \> pwidth || p2 \< 1 || q1 \> qwidth || q2 \< 1  
> @inbounds buf[i,j] = 0  
> else  
> p1 \< 1 && (p1 = 1)  
> p2 \> pwidth && (p2 = pwidth)  
> q1 \< 1 && (q1 = 1)  
> q2 \> qwidth && (q2 = qwidth)  
> blk = @view data[p1:p2,q1:q2]
> 
> ```
> if pooling == "seis"
> if sum(blk) <= 0.0
> @inbounds buf[i,j] = minimum(blk)
> else
> @inbounds buf[i,j] = maximum(blk)
> end
> else
> @inbounds buf[i,j] = pooling(blk)
> end
> 
>     
>     
> end
> end
> 
> ```
> 
> end  
> end

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [March 5, 2023, 9:19am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/30 "2023-03-05T09:19:56Z")

</div>

Now a similar figure to the one I posted looks like this (file written from the modification to have access to the .scene).

 ![Event_22-11-22_22-56](https://global.discourse-cdn.com/julialang/original/3X/b/1/b198dc181b4bec8f3125026da5e107b5b3ac95a1.jpeg)

---

<div class="post-metadata">

**Author:** ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Post date:** [May 16, 2023, 4:32pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/31 "2023-05-16T16:32:30Z")

</div>

Nice

---

<div class="post-metadata">

**Author:** ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Post date:** [May 16, 2023, 4:47pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/32 "2023-05-16T16:47:41Z")

</div>

Just released a new version `v0.4`, which uses the fancy Makie layout APIs and therefore makes `InteractiveViz` much more compatible with all the new wonderful layout stuff.

The data source API has been significantly revamped and improved, and the `InteractiveViz` API is now very compatible with the Makie API, essentially using the same keyword options. This makes things like multiple plots, colorbars, axis labeling, etc, much easier, and what you know from Makie should simply work.

Check out the [README](https://github.com/org-arl/InteractiveViz.jl#readme) for more details!

P.S. An unfortunate by product of this is that the `InteractiveViz` API changed slightly and therefore the release is BREAKING, but I feel it is better in the long run.

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [May 31, 2023, 1:19pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/33 "2023-05-31T13:19:13Z")

</div>

This is GREAT news! I love the package!

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [September 22, 2023, 7:55am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/34 "2023-09-22T07:55:24Z")

</div>

> [@mchitre](#):
>
> README

Hi @mchitre  
Been using the new version and it works great! Thanks a lot.

Just a really silly stuff, would it be possible to include the pooling option a made for the previous version on the current one? This way I do not need to keep a modified copy for several of my projects? 🙂

> if pooling == “seis”  
> if sum(blk) \<= 0.0  
> @inbounds buf[i,j] = minimum(blk)  
> else  
> @inbounds buf[i,j] = maximum(blk)  
> end  
> else  
> @inbounds buf[i,j] = pooling(blk)  
> end

---

<div class="post-metadata">

**Author:** ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Post date:** [September 25, 2023, 6:21pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/35 "2023-09-25T18:21:32Z")

</div>

@marianoarnaiz What does `seis` stand for? If it is generic and useful to many, we can consider adding it to the package. If it is project specific for you, perhaps we can look at a API for users to define new pooling options in their own code without having to modify `InteractiveViz` package.

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [September 25, 2023, 8:43pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/36 "2023-09-25T20:43:22Z")

</div>

Hi @mchitre.  
“seis” stands for seismic or seismology. In this field we tend to plot everything with a symmetrical min-zero-max scale (e.g. -1000:1000). In my code, if the sum of the pooling is negative then use the min, and if positive use the max. Simple but effective. Maybe the name could be “symm” but I think it is an useful feature.

---

<div class="post-metadata">

**Author:** ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Post date:** [September 27, 2023, 6:44am UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/37 "2023-09-27T06:44:45Z")

</div>

@marianoarnaiz Option `pool` takes in a function, so simple enough for you to define the `seis()` function in your code and pass it in, right? Or I am missing something here? Can you give me a code example?

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [January 11, 2024, 7:18pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/38 "2024-01-11T19:18:13Z")

</div>

Hi again. Sorry for the late reply  
How can I pass another pool function to iheatmap? It is not working as before. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [May 30, 2024, 6:47pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/39 "2024-05-30T18:47:53Z")

</div>

Hi Everyone.  
I am using the new version and I love it. Still the iheatmap does not have a way to call a function to change the pooling. It is stuck in max format. Can anyone let me know how to change that for extreme() for example?  
Cheers.

---

<div class="post-metadata">

**Author:** ![mchitre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mchitre/32/13756_2.png) [@mchitre](https://discourse.julialang.org/u/mchitre)\
**Post date:** [May 30, 2024, 7:27pm UTC](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878/40 "2024-05-30T19:27:28Z")

</div>

What would you want `extreme` pooling to do?

[Previous page](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878.md?page=1)

[Next page](https://discourse.julialang.org/t/interactiveviz-an-interactive-visualization-toolkit-for-large-datasets/40878.md?page=3)
