Live data from Hacker News

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

medium.com

41–50 of 190 posts

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

#41
post #24

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.…

Aren't you missing the entire point of exploratory data analysis? Eigenfaces are an example of what you can come up with as the end product of your data exploration, after you've tried many ways of looking at the data and determined that eigenfaces are useful. Your whole third paragraph seems to be criticizing the core purpose of exploratory data analysis as though one should always be able to skip directly to the ne…

> Using the strengths of the human vision system to get a rough idea of what the typical data looks like and the frequency and character of outliers isn't dumping the job of exploratory data analysis onto the reader, it's how the job actually gets done in the first place.

Yup this is a good summary of the intent, we also have to remember that the eigenfaces dataset is a very clean/toy data example. Real datasets never look this good, and just going straight to an eigendecomp or PCA isn't informative without first taking a look at things. Often you may want to do something other than an eigendecomp or PCA, get an idea of your data first and then think about what to do to it.

Edit: the point of that example was to show that visually we can judge what the covariance matrix is producing in the "image space". Sometimes a covariance matrix isn't even the right type of statistic to compute from your data and interactively looking at your data in different ways can help.

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

#42
post #10

I know 3D is in the roadmap. Once the basic functionality is in place, it would be great to also consider integrating molecular visualization or at least provide enough fast primitives to simplify the integration of molecular visualization tools with this library.

We are definitely looking forward to adding more 3D graphics in the future, and this sounds really cool. Would you mind posting an issue on the repo? I think this is something we would want to have on the roadmap or at least an open issue to plan out how we could do this. Thanks!

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

#44
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

This is the correct take. There are almost always better ways to plot three dimensional data than trying to project 3D geometry to 2D.

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

#45

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...

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

#46
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.

I think one nice thing that we have tried to do is limit super heavy dependencies and also separate optional dependencies to streamline things.

The quickest install would be `pip install fastplotlib`. This would be if you were interested in just having the barebones (no imgui or notebook) for desktop viz using something like glfw.

We can think about adding in our docs some kind of import time metrics.

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

#47
post #7

Really nice post introducing your library. When would you reach for a different library instead of fastplotlib? How does this deal with really large datasets? Are you doing any type of downsampling? How does this work with pandas? I didn't see it as a requirement in setup.py Does this work in Jupyter notebooks? What about marimo?

Thanks!

> When would you reach for a different library instead of fastplotlib?

Use the best tool for your usecase, we're focused on GPU accelerated interactive visualization. Our use cases broadly are developing ML algorithms, user-end ML Ops tools, and looking live data off of live scientific instruments.

> How does this deal with really large datasets? Are you doing any type of downsampling?

Depends on your hardware, see https://fastplotlib.org/ver/dev/user_guide/faq.html#do-i-nee...

> How does this work with pandas? I didn't see it as a requirement in setup.py

If you pass in numpy-like types that use the buffer protocol it should work, we also want to support direct dataframe input in the future: https://github.com/fastplotlib/fastplotlib/issues/395

There are more low-level priorities in the meantime.

> Does this work in Jupyter notebooks? What about marimo?

Jupyter yes via juptyer-rfb, see our repo: https://github.com/fastplotlib/fastplotlib?tab=readme-ov-fil...

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

#48
post #35

[flagged]

I dunno why you'd say this, neither of us are fans of LLMs and most of this was written before LLMs were a thing :)

Maybe Claude was trained on your code. You should take it as a compliment.

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

#49
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

Thank you for your interest! We have taken a lot of inspiration from pyqtgraph and really like their library.

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

#50
post #39

Yeah, many browsers have webgpu turned off by default, So you're stuck with wasm (wasm Simd if you're lucky) Hopefully both are implemented.

This library builds upon pygfx and wgpu-py. Unfortunately, the latter doesn't support running on WASM, pyscript or pyodide yet, but there's an issue about it:

https://github.com/pygfx/wgpu-py/issues/407

PRs welcome though :-)

Post reply on HN