I want to plot 25 slices of a brain scan using nilearn. These 25 slices should go along the z axis in steps of value=2. I want to use subplots to present them using subplots.
Here is what I have so far:
cuts = np.arange(-25,25,2)
fig, (axes1,axes2,axes3,axes4,axes5) = plt.subplots(5,1, figsize=(10,10))
for axes in [axes1,axes2,axes3,axes4,axes5]:
for slc in cuts:
plotting.plot_stat_map(rsn_four, display_mode='z', axes=axes, cut_coords=[slc], threshold=2)
plt.show()
'rsn_four' is a 3D Nifti file of a BOLD scan.
I think one of my biggest problem is that I do not know how to implement 5 values of the np.arange() and then bring it to the next axis continuing the counting.
The enumerate built-in may be helpful here in getting only the correct indices from cuts that you would want per image