Live data from Hacker News

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

medium.com

61–70 of 190 posts

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

#61

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!

Just to add on, colab is weird and not performant, this PR outlines our attempts to get jupyter-rfb working on colab: https://github.com/vispy/jupyter_rfb/pull/77

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

#62
post #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.

This is very nice. But thinking more along the lines of, can I embed a single interactive widget in a blog post.

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

#63
post #37

Earlier quoted context omitted.

I have to agree with your point about EDA. The library is neat, but even the example of covariance matrix animation is a bit contrived. Every pixel has a covariance with every other pixel, so sliding though the rows of the covariance matrix generates as many faces on the right as there are pixels in a photograph of a face. However the pixels that strongly co-vary will produce very similar right side "face" pictures.…

Hi, one of the other devs here. As the poster below pointed out what you're missing is that in this case we know that an eigendecomposition or PCA will be useful. However if you're working on matrix decomposition algorithms like us, or if you're trying to design new forms of summary matrices because a covariance matrix isn't informative for your type of data then these types of visualizations are useful. We broadly w…

I've also worked on designing new matrix decompositions, and I've never found the need for anything but `imshow`...

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

#64
post #38

Very interesting and promising package. I especially like that there is a PyQt interface which might provide an alternative to another great package: pyqtgraph[0]. [0] https://github.com/pyqtgraph/pyqtgraph

Thanks! I used pyqtgraph for many years and love what can be done by it, we started off wanting to build something like it but based on WGPU and not bound to Qt.

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

#65
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…

I agree with you sfpotter, very interesting. Looks in some ways similar to PyQtGraph regarding real time plotting.

I agree with you regarding matplotlib, although I find a lot of faults/frustration in using it. Both your points on 3D plotting and WYSIWYG editor would be extremely nice and as far as I know nothing exists in python ticking these marks. For 3D I typically default to Matlab as I've found it to be the most responsive/easy to use. I've not found anything directly like a WYSIWYG editor. Stata is the closest but I deplore it, R to some extent has it but if I'm generating multiple plots it doesn't always work out.

I'm surprised by what you said about "EDA". I find the opposite, a shotgun approach, exploring a vast number of plots with various stratifications gives me better insight. I've explored plotting across multiple languages (R,python,julia,stata) and not found one that meets all my needs.

The biggest issue I often face is I have 1000 plots I want to generate that are all from separate data groups and could all be plotted in parallel but most plotting libraries have holds/issues with distribution/parallelization. The closest I've found is I'll often build up a plot in python using a Jupyter notebook. Once I'm done I'll create a function taking all the needed data/saving a plot out, then either manually or with the help of LLMs convert it to julia which I've found to be much faster in loading large amounts of data and processing it. Then I can loop it using julia's "distributed" package. Its less then ideal, threaded access would be great, rather then having to distribute the data, but I've yet to find something that works. I'd love a simple 2D EDA plotting library that has basic plots like lines, histograms (1/2d), scatter plots, etc, has basic colorings and alpha values and is able to handle large amounts (thousands to millions of points) of static data and plot it saving to disk parallelized. I've debated writing my own library but I have other priorities currently, maybe once I finish my PhD.

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

#69
post #37

Earlier quoted context omitted.

Hi, one of the other devs here. As the poster below pointed out what you're missing is that in this case we know that an eigendecomposition or PCA will be useful. However if you're working on matrix decomposition algorithms like us, or if you're trying to design new forms of summary matrices because a covariance matrix isn't informative for your type of data then these types of visualizations are useful. We broadly w…

I've also worked on designing new matrix decompositions, and I've never found the need for anything but `imshow`...

ok, different libraries have different use cases, the type of data we work with absolutely necessitates dynamic visualization. You wouldn't view a video with imshow would you?

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

#70

Earlier quoted context omitted.

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! Just to add on, colab is weird and not performant, this PR outlines our attempts to get jupyter-rfb working on colab: https://github.com/vispy/jupyter_rfb/pull/77

Thanks. Yeah I've been baffled as to why just interactive Matplotlib with a Colab kernel is so slow. The Colab CPU is fast (enough), the network is fast, I haven't been able to figure out where the bottleneck is either.
Post reply on HN