Skip to content Skip to footer
0 items - $0.00 0

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

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

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

18 Comments

  • Post Author
    ZeroCool2u
    Posted March 11, 2025 at 4:57 pm

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

    “`

  • Post Author
    asangha
    Posted March 11, 2025 at 5:00 pm

    >sine_wave.colors[::3] = "red"

    I never knew I needed this until now

  • Post Author
    sfpotter
    Posted March 11, 2025 at 5:05 pm

    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 needle in the haystack is. IME, throwing up a ton of plots and being able to scrub around in them never seems to provide much insight. It's also very fast—usually the feedback loop is like "make a plot, go away and think about it for an hour, decide what plot I need to make next, repeat". If there is too much data on the screen it defeats the point of EDA a little bit.

    For me, matplotlib still reigns supreme. Rather than a fancy new visualization framework, I'd love for matplotlib to just be improved (admittedly, fastplotlib covers a different set of needs than what matplotlib does… but the author named it what they named it, so they have invited comparison. ;-) ).

    Two things for me at least that would go a long way:

    1) Better 3D plotting. It sucks, it's slow, it's basically unusable, although I do like how it looks most of the time. I mainly use PyVista now but it sure would be nice to have the power of a PyVista in a matplotlib subplot with a style consistent with the rest of matplotlib.

    2) Some kind of WYSIWYG editor that will let you propagate changes back into your plot easily. It's faster and easier to adjust your plot layout visually rather than in code. I'd love to be able to make a plot, open up a WYSIWYG editor, lay things out a bit, and have those changes propagate back to code so that I can save it for all time.

    (If these features already exist I'll be ecstatic ;-) )

  • Post Author
    paddy_m
    Posted March 11, 2025 at 5:07 pm

    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?

  • Post Author
    carabiner
    Posted March 11, 2025 at 5:08 pm

    GPU all the things! GPU-accelerated Tableau would be incredible.

  • Post Author
    pama
    Posted March 11, 2025 at 5:16 pm

    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.

  • Post Author
    theLiminator
    Posted March 11, 2025 at 5:19 pm

    Do you have any numbers for the rough number of datapoints that can be handled? I'm curious if this enables plotting many millions of datapoints in a scatterplot for example.

  • Post Author
    CreRecombinase
    Posted March 11, 2025 at 5:23 pm

    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 try this out

  • Post Author
    abdullahkhalids
    Posted March 11, 2025 at 6:00 pm

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

  • Post Author
    meisel
    Posted March 11, 2025 at 6:06 pm

    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.

  • Post Author
    749402826
    Posted March 11, 2025 at 6:12 pm

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

  • Post Author
    Starlord2048
    Posted March 11, 2025 at 6:12 pm

    [flagged]

  • Post Author
    klaussilveira
    Posted March 11, 2025 at 6:12 pm

    Very cool to see imgui empowering so many different things.

  • Post Author
    rossant
    Posted March 11, 2025 at 6:38 pm

    Shameless plug: I'm actively working on a similar project, Datoviz [1], a C/C++ library with thin Python bindings (ctypes). It supports both 2D and 3D but is currently less mature and feature-complete than fastplotlib. It is also lower level (high-level capabilities will soon be provided by VisPy 2.0 which will be built on top of Datoviz, among other possible backends).

    My focus is primarily on raw performance, visual quality, and scalability for large datasets—millions, tens of millions of points, or even more.

    [1] https://datoviz.org/

  • Post Author
    qoez
    Posted March 11, 2025 at 7:22 pm

    This smells of claude generated code for some reason.

  • Post Author
    roter
    Posted March 11, 2025 at 7:28 pm

    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

  • Post Author
    gooboo
    Posted March 11, 2025 at 7:30 pm

    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.

  • Post Author
    crazygringo
    Posted March 11, 2025 at 7:30 pm

    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 image is rendered it has to be transmitted via the Jupyter connector and network and that can turn out to be really slow.

Leave a comment

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.