/fastplotlib-scipy2023

fastplotlib demos at scipiy 2023

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

fastplotlib SciPy 2023

Materials for the fastplotlib talk at SciPy 2023. This repo includes installation instructions and the demo notebooks covered in our talk.

For more info on fastplotlib see the repo: https://github.com/kushalkolar/fastplotlib/

The demos cover the following topics:

  1. Images - plotting simple images, feature changes, image updates, ImageWidget
  2. Lines - 2D line plots, fancy indexing of features, LineCollection, LineStack, LinearSelector, LinearRegionSelector, Heatmap
  3. Interactivity - high-level interactivity system to link graphics and their features together, addding event handlers for further interaction
  4. GridPlots - grid of Subplots
  5. Scatters - 2D and 3D scatter plots

Installation instructions

See the fastplotlib repo for installation.

In order to run the notebooks you will also need to have imageio and zarr installed. These are not dependencies of fastplotlib, but are being used in these demos.

Install using pip

# other packages specifically used for this demo
# jupyterlab v3 because of sidecar, and pin pylingalg because of pygfx
pip install "jupyterlab<4" imageio "imageio[pyav]" zarr sidecar pylinalg==0.4.0 scikit-image glfw

# optional, you'll need C compilers
pip install simplejpeg

# fastplotlib with notebook dependencies
pip install "fastplotlib[notebook]"

General fastplotlib API

1. Graphics - objects that are drawn

  • Image, Line, Scatter, Heatmap
  • Collections - LineCollection, LineStack (ex: neural timeseries data)
  • Interactions

2. Layouts

  • Plot - a single plot area
  • GridPlot - a grid of Subplots

3. Widgets - high level widgets to make repetitive UIs easier

  • ImageWidget- n-dimensional widget for Image data
  • Sliders, support window functions, GridPlot, etc.

Docs

For a more in-depth look at our API, please visit our docs.

Contributions

fastplotlib is a relatively new library, and we are always looking for feedback or help! Please see the contributing guide.

You can also look at our Roadmap for 2023 and Issues for more ideas on how to contribute.