EuroSciPy 2024

fastplotlib: A high-level library for ultra fast visualization of large datasets using modern graphics APIs
08-29, 13:55–14:25 (Europe/Berlin), Room 7

Fast interactive visualization remains a considerable barrier in analyses pipelines for large neuronal datasets. Here, we present fastplotlib, a scientific plotting library featuring an expressive API for very fast visualization of scientific data. Fastplotlib is built upon pygfx which utilizes the GPU via WGPU, allowing it to interface with modern graphics APIs such as Vulkan for fast rendering of objects. Fastplotlib is non-blocking, allowing for interactivity with data after plot generation. Ultimately, fastplotlib is a general purpose scientific plotting library that is useful for the fast and live visualization and analysis of complex datasets.


Over the past decade, advanced analyses pipelines have been developed for the analysis of large datasets. However, fast visualization and live interactivity during data collection remains challenging. While current tools within the Python plotting ecosystem allow for interactive data visualization, they either fail to leverage modern GPUs efficiently, lack intuitive APIs for rapid prototyping, or require users to write their own shaders. Additionally, other popular plotting libraries, such as bokeh and matplotlib, are not geared towards fast interactive visualization with millions of objects. Given these challenges with current visualization tools, the need for a modern GPU-driven interactive plotting library exists. In this presentation, we will go through the technical details, as well as a brief demo on how fastplotlib makes fast interactive visualization of complex datasets possible. We will demonstrate the broad applicability of fastplotlib as a fast, general-purpose plotting library.
Fastplotlib is built on top of pygfx which is a cutting edge Python rendering engine that utilizes WGPU, which can efficiently leverage modern GPU and CPU hardware. WGPU is the successor to OpenGL and features a low overhead with respect to the amount of code per-draw-per-object allowing for speed even when rendering millions of objects. Pygfx is also non-blocking, which allows for interactivity and modification of already drawn objects. Fastplotlib utilizes the pygfx rendering library for fast visualization with an expressive API for scientific visualization. The benefits of fastplotlib are that it reduces boilerplate code which allows users to focus on their data without having to manage the underlying rendering process. Additionally, fastplotlib allows for animations as well as high-level interactivity among plots, which can be combined with lazy loading and lazy compute of very large datasets that are hundreds of gigabytes or terabytes in size. Furthermore, fastplotlib can be used in jupyter notebooks, allowing it to be used on cloud computing and other remote infrastructures for streaming visualizations of extremely large datasets. In total, these unique features and the underlying architecture create a plotting library that is fast, easy to use, and multifaceted.


Project Homepage / Git

https://github.com/fastplotlib/fastplotlib

Public link to supporting material

https://github.com/fastplotlib/fastplotlib

Expected audience expertise: Python

some

Abstract as a tweet

fastplotlib: A high-level library for ultra fast visualization of large datasets using modern graphics APIs

Category [Data Science and Visualization]

Data Visualization

Expected audience expertise: Domain

some

PhD Candidate in Biomedical Engineering at the Flatiron Institute for Computational Neuroscience and NYU. 10+ years of experience using Python for data analysis and machine learning with neuroscience datasets. Core developer of fastplotlib and maintainer of several Python libraries in neuroscience with significant user bases, and a contributor to other libraries such as tslearn and CaImAn.

Co-developer of fastplotlib. First-year PhD Student at Duke University in the lab of Prof. John Pearson studying Electrical & Computer Engineering.