Better HN
topnewbestaskshowjobs
Log inSign up

fpl-dev

29 karma · joined Mar 11, 2025 (1y ago) · 22 submissions

Submissions

comment 1y ago · link · parent

Hi! I've seen some of your work on wgpu-py! Definitely let us know if you need help or have ideas, if you're on the main branch we recently merged a PR that allows events to be bidirectional.

comment 1y ago · link · parent

Rendering frames and saving them to disk can be done with rendercanvas but we haven't exposed this in fastplotlib yet: https://github.com/pygfx/rendercanvas/issues/49

comment 1y ago · link · parent

Yea the security issue is why I'm pretty sure you can't do it on WGPU, but Vulkan and cupy can fully run locally so it doesn't have the same security concern.

comment 1y ago · link · parent

Thanks! Yup our focus is not publication figures, matplotlib and seaborn cover that space pretty well.

comment 1y ago · link · parent

This looks cools thanks! Makes me wonder if there's any way to do that with WGPU if WGPU is interfacing with Vulkan, probably not easy if possible I"m guessing.

WGPU has security protections since it's designed for the browser so I'm guessing it's impossible.

comment 1y ago · link · parent

We offer a lot of ways to slice colors, set cmaps and cmap transforms, they are really useful in neuroscience:

https://fastplotlib.org/ver/dev/_gallery/line/line_colorslic...

https://fastplotlib.org/ver/dev/_gallery/line/line_cmap_more...

https://fastplotlib.org/ver/dev/_gallery/line/line_cmap.html...

And with collections if you want to go crazy: https://fastplotlib.org/ver/dev/_gallery/line_collection/lin...

comment 1y ago · link · parent

Thanks! That is a great question and one that I've we've been battling with as well. As far as we know, this is not possible due to the way different contexts are set up on the GPU https://github.com/pygfx/pygfx/issues/510

tinygrad which I haven't used seems torch-like and has a WGPU backend: https://github.com/tinygrad/tinygrad

comment 1y ago · link · parent

Exactly that's a good example!

comment 1y ago · link · parent

The example from the article with the subtitle "Large-scale calcium imaging dataset with corresponding behavior and down-stream analysis" is a good example. We have brain imaging video that is acquired simultaneously with behavioral video data. It is absolutely essential to view the raw video at 30-60Hz.

comment 1y ago · link · parent

Almar made blog posts about the line shader he wrote!

https://almarklein.org/triangletricks.html

https://almarklein.org/line_rendering.html

A big shader refactor was done in this PR: https://github.com/pygfx/pygfx/pull/628

comment 1y ago · link · parent

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?

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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!

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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 :)

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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 work on designing new forms of matrix decomposition algorithms so it's very useful to look at the matrices and then try to determine what types of decompositions we want to do.