A fast plotting library built using the pygfx
render engine that can use Vulkan, so it is very fast!
Checkout pygfx! https://github.com/pygfx/pygfx
fastplotlib
is in the alpha stage and experimental but you're welcome to try it out or contribute!
Questions, ideas? Chat on gitter: https://gitter.im/fastplotlib/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link
See the examples directory. Start out with simple.ipynb
which uses the high level API.
from fastplotlib import Plot
import numpy as np
plot = Plot()
data = np.random.rand(512, 512) * 255
plot.image(data=data, vmin=0, vmax=255, cmap='viridis')
plot.show()
from fastplotlib import Plot
import numpy as np
plot = Plot()
data = np.random.rand(512, 512) * 255
image = plot.image(data=data, vmin=0, vmax=255, cmap='viridis')
def update_data():
new_data = np.random.rand(512, 512) * 255
image.update_data(new_data)
plot.add_animations([update_data])
plot.show()
Install directly from GitHub using pip
.
pip install git+https://github.com/kushalkolar/fastplotlib.git
Note: do not download the version that is currently on PYPI (i.e. don't just do pip install fastplotlib
, it is outdated (we're waiting for the next release of pygfx
)
Clone or download the repo to try the examples
# clone the repo
git clone https://github.com/kushalkolar/fastplotlib.git
# cd into examples and launch jupyter lab
cd fastplotlib/examples
jupyter lab
You will need a GPU that supports Vulkan (iGPUs in CPUs should be fine). Generally if your GPU is from 2017 or later it should support Vulkan. See the section on "Install Vulkan drivers" below for more information.
git clone https://github.com/kushalkolar/fastplotlib.git
cd fastplotlib
pip install -r requirements.txt
pip install -e .
# try the examples
cd examples
jupyter lab
For more information see: https://github.com/pygfx/wgpu-py#platform-requirements
Apparently Vulkan should be installed by default on Windows 11.
Debian based distros:
sudo apt install mesa-vulkan-drivers
# for better performance with the remote frame buffer install libjpeg-turbo
sudo apt install libjpeg-turbo
For other distros install the appropriate vulkan driver package.
You will need at least MacOSX v10.13, not sure how to install Vulkan drivers on Mac. If anyone knows you can add instructions here!
https://www.youtube.com/embed/-_0Gp_EqepI