brainbox.atlas
Functions which map metrics to the Allen atlas.
Code by G. Meijer
Functions
Plot a sagittal, coronal and horizontal slice of the Allen atlas with regions colored in according to any value that the user specifies. |
- plot_atlas(regions, values, ML=-1, AP=0, DV=-1, hemisphere='left', color_palette='Reds', minmax=None, axs=None, custom_region_list=None)[source]
Plot a sagittal, coronal and horizontal slice of the Allen atlas with regions colored in according to any value that the user specifies.
- Parameters:
regions (1D array) – Array of strings with the acronyms of brain regions (in Allen convention) that should be filled with color
values (1D array) – Array of values that correspond to the brain region acronyms
ML (float) – The coordinates of the slices in mm
AP (float) – The coordinates of the slices in mm
DV (float) – The coordinates of the slices in mm
hemisphere (string) – Which hemisphere to color, options are ‘left’ (default), ‘right’, ‘both’
color_palette (any input that can be interpreted by sns.color_palette) – The color palette of the plot
minmax (2 element array) – The min and max of the color map, if None it uses the min and max of values
axs (3 element list of axis) – A list of the three axis in which to plot the three slices
custom_region_list (1D array with shape the same as ba.regions.acronym.shape) – Input any custom list of acronyms that replaces the default list of acronyms found in ba.regions.acronym. For example if you want to merge certain regions you can give them the same name in the custom_region_list