Newbie: How to do glass brain-plots with brain regions in one brain object in an accurate way with plot stat map code? The question for transparency via plot stat map

Is there an easy way for plotting multiple colored brain regions in one brain objects (e.g. hemi= left) like the job is done by glass brain plot. There is an comment in one topic in this platform that these glass brain plots are not as accurate as stat map-plots.
Trying the easy way up to now is like:
get_ipython().system(‘pip install siibra==0.4a35’)


import siibra
assert siibra.version >= “0.4a35”
from nilearn import plotting
import matplotlib.pyplot as plt
get_ipython().run_line_magic(‘matplotlib’, ‘notebook’)


atlas = siibra.atlases[‘human’]
parcellation = atlas.get_parcellation(‘JULICH_BRAIN_PROBABILISTIC_CYTOARCHITECTONIC_MAPS_V2_9’)

julich_pmaps = siibra.get_map(
parcellation=“julich 2.9”,


get the regions of interest

left_frontaltotemperal_II = parcellation.get_region(‘Frontal-to-Temporal-II left’)
right_CA1 = parcellation.get_region(‘right_CA1’)
right_STS2 = parcellation.get_region(‘Area STS2 right’)
left_FG1 = parcellation.get_region(‘left FG1’)


get the maps for the regions of interest

left_frontaltotemperal_II_map =julich_pmaps.fetch(left_frontaltotemperal_II)
right_CA1_map = julich_pmaps.fetch(right_CA1)
right_STS2_map = julich_pmaps.fetch(right_STS2)
left_FG1_map = julich_pmaps.fetch(left_FG1)


plot the maps with the desired colors

fig, ax = plt.subplots(1, 1)
plotting.plot_glass_brain(left_frontaltotemperal_II_map, cmap=‘Purples’, title=’ 2’, axes=ax, alpha=0.05, display_mode = ‘lr’, plot_abs= ‘False’)
plotting.plot_glass_brain(right_CA1_map, cmap=‘Greens’, title=’ 2’, axes=ax, alpha=0.05, display_mode = ‘lr’, plot_abs= ‘False’)
plotting.plot_glass_brain(right_STS2_map, cmap=‘Blues’, title=’ 2’, axes=ax, alpha=0.05, display_mode = ‘lr’, plot_abs= ‘False’)
plotting.plot_glass_brain(left_FG1_map, cmap=‘Reds’, title=‘1’, axes=ax, alpha=0.05, display_mode = ‘lr’, plot_abs= ‘False’)

fig, ax = plt.subplots(1, 1)
plotting.plot_stat_map(left_frontaltotemperal_II_map, cmap=‘Purples’, title=’ 3’, axes=ax, draw_cross =False)
plotting.plot_stat_map(right_CA1_map, cmap=‘Greens’, title=’ 3’, axes=ax, draw_cross= False)
plotting.plot_stat_map(right_STS2_map, cmap=‘Blues’, title=’ 3’, axes=ax, draw_cross= False)
plotting.plot_stat_map(left_FG1_map, cmap=‘Reds’, title=’ 3’, axes=ax, draw_cross= False)

show the plot

Additionally: With this script it became obvious that the overlay of stat maps in one picture is also not accurate for all maps.
So, sorry for these simple questions. However Jitsi help seem to be on summer vacation today.

Hi @cadigo we have some functionality in the nilearn that I think does what you’re looking for a bit better. You can define a display object by calling plotting.plot_stat_map on one of your regions and then call the add_overlay method on the other 3 regions. You can also try plotting.plot_prob_atlas. There’s also a cut_coords parameter for both plotting functions that you can control the location in xyz where the cuts are made and specifying this might help get a better view of the activations. See this runnable example showcasing both these options.

1 Like