src.canns.analyzer.plotting.jupyter_utils

Utilities for Jupyter notebook integration with matplotlib animations.

Functions

display_animation_in_jupyter(animation[, format])

Display a matplotlib animation in Jupyter notebook using HTML/JavaScript.

is_jupyter_environment()

Detect if code is running in a Jupyter notebook environment.

Module Contents

src.canns.analyzer.plotting.jupyter_utils.display_animation_in_jupyter(animation, format='jshtml')[source]

Display a matplotlib animation in Jupyter notebook using HTML/JavaScript.

Parameters:
  • animation – matplotlib.animation.FuncAnimation object

  • format (str) – Display format - ‘jshtml’ (default) or ‘html5’ (video tag)

Returns:

IPython.display.HTML object if successful, None otherwise

src.canns.analyzer.plotting.jupyter_utils.is_jupyter_environment()[source]

Detect if code is running in a Jupyter notebook environment.

Returns:

True if running in Jupyter/IPython notebook, False otherwise.

Return type:

bool