Skip to content

fastplotlib/fastplotlib-fens2024

Repository files navigation

fastplotlib-fens2024

Materials for the fastplotlib talk at FENS Forum 2024. This repo includes installation instructions and the demo notebooks covered in our talk. These demos can downloaded and ran locally, but the official built site for the workshop can be found here

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

The demos cover the following topics:

  1. Simple introduction to fastplotlib - Images, Lines, and events
    • plotting simple images, feature changes, image updates, fancy indexing of features
    • included exercises
  2. Neuroscience using fastplotlib
    • building a complex plot to explore behavioral and calcium imaging data
    • integration of fastplotlib with pynapple

Installation Instructions

See the fastplotlib repo for installation.

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

Install using pip

# you will need to install imageio
pip install imageio

# you will need to install scikit-image
pip install scikit-image

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

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

# pynapple
pip install pynapple

General fastplotlib API

1. Graphics - objects that are drawn

  • Image, Line, Scatter

  • Collections - LineCollection, LineStack (ex: neural timeseries data)

    a) Graphic Properties

    • Common: Name, Offset, Rotation, Visible, Deleted
    • Graphic Specific: ImageVmin, ImageVmax, VertexColors, etc.

    b) Selectors

    • LinearSelector - horizontal or vertical line slider
    • LinearRegionSelector - horizontal or vertical resizable region selection

2. Layouts

  • Figure - a single plot or a grid of subplots

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

  • ImageWidget- widget for ImageGraphic data with dims: xy, txy, tzxy
  • Sliders, support window functions, 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 2025 and Issues for more ideas on how to contribute.

About

Materials and resources for FENS 2024 Workshop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published