Live data from Hacker News

Fastplotlib: GPU-accelerated, fast, and interactive plotting library

medium.com

51–60 of 190 posts

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#51
post #15

One of the big bottlenecks of plotting libraries is simply the time it takes to import the library. I’ve seen matplotlib being slow to import, and in Julia they even have a “time to first plot” metric. I’d be curious to see how this library compares.

Almar did some work on speeding up imports a year ago: https://github.com/fastplotlib/fastplotlib/pull/431

but we haven't benchmarked it yet

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#52

Is it possible to put the interactive plots on your website? Or is this a Jupyter notebook only tool.

In the browser only jupyter for now, you can use voila to make a server based application using jupyter: https://github.com/voila-dashboards/voila

As Caitlin pointed out below pyodide is a future goal.

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#53
post #27
post #6

Very cool effort. That said, and it's probably because of the kind of work that I do, but I have almost never found the four challenges to be any kind of a problem for me. Although I do think there is some kind of contradiction there. Plotting (exploratory data analyis ("EDA"), really) is all about distilling key insights and finding features hidden in data. But you have to some kind of intuition about where the need…

My hot take is that 3D plotting feels bad because 3D plots are bad. You can usually find some alternative way of representing the data

I work on solving 3D problems: numerical methods for PDEs in R^3, computational geometry, computational mechanics, graphics, etc. Being able to make nice 3D plots is super important for this. I agree it's not always necessary, and when a 2D plot suffices, that's the way to go, but that doesn't obviate my need for 3D plots.

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#54

Very cool to see imgui empowering so many different things.

We love imgui! Big thanks to the imgui devs, and Pascal Thomet who maintains the python bindings for imgui-bundle, and https://github.com/panxinmiao who made an Imgui Renderer for wgpu-py!

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#55
post #6

Very cool effort. That said, and it's probably because of the kind of work that I do, but I have almost never found the four challenges to be any kind of a problem for me. Although I do think there is some kind of contradiction there. Plotting (exploratory data analyis ("EDA"), really) is all about distilling key insights and finding features hidden in data. But you have to some kind of intuition about where the need…

For point (2), have you tried the perspective-viewer library? You can make edits in the UI and then use the "debug view" to copy and paste the new configuration back into your code.

https://perspective.finos.org/

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#56

Every two weeks or so I peruse github looking for something like this and I have to say this looks really promising. In statistical genetics we make really big scatterplots called Manhattan plots https://en.wikipedia.org/wiki/Manhattan_plot and we have to use all this highly specialized software to visualize at different scales (for a sense of what this looks like: https://my.locuszoom.org/gwas/236887/ ). Excited to…

Hey! This sounds like a really interesting use case. If you run into any issues or need help with the visualization, please don't hesitate to post an issue on the repo. We can also think about adding an example demo of a manhattan plot to help too!

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#57

"Fast" is a bold claim, given the complete lack of benchmarks and the fact that it's written entirely in Python...

In fastplotlib at the end of the day everything is wgpu under the hood, and as the other poster correctly pointed out about numpy being fortran and C wrappers.

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#58
post #36

Is it possible to put the interactive plots on your website? Or is this a Jupyter notebook only tool.

See here: https://www.fastplotlib.org/ver/dev/user_guide/faq.html#what... We are hoping for pyodide integration soon, which would allow fastplotlib to be run strictly in the browser!

Thanks. That will be very cool.

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#59

Seems like a nice library, but I have a hard time seeing myself using it over plotly. The plotly express API is just so simple and easy. For example, here's the docs for the histogram plot: https://plotly.com/python/histograms/ This code gives you a fully interactive, and performant, histogram plot: ```python import plotly.express as px df = px.data.tips() fig = px.histogram(df, x="total_bill") fig.show() ```

Different use cases :) Plotly doesn't give the performance and interactive tools required for many neuroscience visualizations. We also focus more on the primitive graphics and, at least not yet, on the more complex "composite" graphics built with primitives like histograms.

Re: Fastplotlib: GPU-accelerated, fast, and interactive plotting library

#60

Sounds really compelling. But it doesn't seem to answer how it works in Jupyter notebooks, or if it does at all. Is the GPU acceleration done "client-side" (JavaScript?) or "server-side" (in the kernel?) or is there an option for both? Because I've used supposedly fast visualization libraries in Google Colab before, but instead of updating at 30 fps, it takes 2 seconds to update after a click, because after the new i…

Fastplotlib definitely works in Jupyterlab through jupyter-rfb https://github.com/vispy/jupyter_rfb I believe the performance is pretty decent, especially if you run the kernel locally Their docs also cover this as mentioned by @clewis7 below: https://www.fastplotlib.org/ver/dev/user_guide/faq.html#what...

Thanks Ivo!
Post reply on HN