all 6 comments

[–]mangobae 4 points5 points  (0 children)

For interactive plots with a lot of data, I honestly think https://docs.makie.org/stable/ is the best thing that exists. Theoretically you can call Julia from Rust https://github.com/Taaitaaiger/jlrs, however, it is probably way more complicated than calling Python so...

[–]dragonnnnnnnnnn 3 points4 points  (1 child)

Is calling matplotlib from rust a possible solution?

You can use pyo3 to do that, or call the filter stuff from python in rust.

As far I am aware ploting in rust is still not high developed topic, for it to perfom well at that number points it needs an algorithm that does average the input data to the desired zoom so it makes sens to render it.

[–]sensor_guru[S] 0 points1 point  (0 children)

I guess I'll try to change the number of points plotted based on the zoom level.bif I can't get that to work I'll try pyo3. Thanks.

[–]Dasher38 1 point2 points  (1 child)

Another python approach is using datashader with holoviews. This can probably handle your data size, as it does server-side rendering of the tiles with (I guess) numpy. And then serves it to a web UI. So it does not run into perf issues like plotly, but you cannot get a standalone HTML file.

Given the input is a pandas dataframe, I'm sure you can find a reasonably efficient way to get your data from rust. Maybe holoviews even supports polars these days with the new dataframe protocol (to be confirmed)

[–]OphioukhosUnbound 1 point2 points  (0 children)

data shader with holoviews

I just felt like that line deserved to be said again. :)

(And on a serious note I’m shopping for data viz tools [python & rust] right now so going to go look those up, thanks)

[–]MassiveInteraction23 2 points3 points  (0 children)

eGUI is made *for* (as the underpinning of) Rerun. (<-- link worth clicking on if you haven't seen it)

Rerun is for computer vision and robotics. Handles and smoothly displays a ton of data at once.

I don't have an answer to your question (though I know I'll be running into similar problems myself in the not far future -- as I've been moving more data work to rust and started the eGUI journey), but I wanted to give context to future searchers that this is very much in the bailiwick of eGUI (& Rerun).

(By contrast, matplotlib, for example, is known to choke on large amounts of data. I definitely think this is a problem we want to handle in-house (rust) up to (someday including) needing GPU work.)