neuromaps_mouse.plotting.plot_allenccfv3_lightbox

neuromaps_mouse.plotting.plot_allenccfv3_lightbox(regions, values, view='coronal', slices=[1000, 2000, 3000], cmap='viridis', clim=None, cnorm=None, show_colorbar=True, cbar_title=None, equal_scale=True, equal_scale_zoom=1, show_scale=True, show_coord=True, figsize=None, cbar_kws=None, lc_kws=None, pc_kws=None, verbose=1)[source]

Create a lightbox display of Allen CCFv3 brain regions across multiple slices.

This function generates a multi-panel figure showing brain regions across multiple sequential slices in a single anatomical plane (coronal, axial, or sagittal). This “lightbox” visualization is useful for examining regional changes across the anterior-posterior, superior-inferior, or medial-lateral axes.

Parameters:
  • regions (array-like of str) – Brain region acronyms to plot (e.g., [‘VIS’, ‘SS’]).

  • values (array-like of float) – Data values for each region, used for colormap mapping.

  • view ({'coronal', 'axial', 'sagittal'}, optional) – Anatomical plane to display. Default is ‘coronal’.

  • slices (array-like of int, optional) – Coordinates (in micrometers) along the view axis for each slice. Default is [1000, 2000, 3000].

  • cmap (str, optional) – Name of the colormap to use. Default is ‘viridis’.

  • clim (tuple of float, optional) – Colormap limits (vmin, vmax). If None, uses 2.5-97.5 percentiles of values. Default is None.

  • cnorm (matplotlib.colors.Normalize, optional) – Custom normalization for colormap. If None, created from clim. Default is None.

  • show_colorbar (bool, optional) – Whether to display a colorbar. Default is True.

  • cbar_title (str, optional) – Title label for the colorbar. Default is None.

  • equal_scale (bool, optional) – Whether to use equal scaling across all axes. Default is True.

  • equal_scale_zoom (float, optional) – Zoom factor for equal scaling (1 = full view). Default is 1.

  • show_scale (bool, optional) – Whether to display a scale bar on each slice. Default is True.

  • show_coord (bool, optional) – Whether to display slice coordinates on each panel. Default is True.

  • figsize (tuple of float, optional) – Figure size as (width, height) in inches. If None, automatically set to (len(slices), 1). Default is None.

  • cbar_kws (dict, optional) – Additional keyword arguments for colorbar configuration. Default is None.

  • lc_kws (dict, optional) – Keyword arguments for LineCollection (e.g., color, lw). Default is None.

  • pc_kws (dict, optional) – Keyword arguments for PolyCollection. Default is None.

  • verbose (int, optional) – Verbosity level for warnings about unavailable regions. Default is 1.

Returns:

  • fig (matplotlib.figure.Figure) – The figure object containing the lightbox subplots.

  • axes (numpy.ndarray) – Array of matplotlib.axes.Axes objects (shape n_slices,).

Notes

Each panel represents a 2D cross-section at a specific coordinate along the selected anatomical plane. The function automatically determines appropriate figure dimensions based on the number of slices if figsize is not provided.

Examples

>>> regions = ['VIS', 'SS', 'MO']
>>> values = [0.5, 0.7, 0.3]
>>> fig, axes = plot_allenccfv3_lightbox(
...     regions, values,
...     view='coronal',
...     slices=[5000, 6000, 7000],
...     cbar_title='Expression Level'
... )