PySurfer
PySurfer copied to clipboard
How to make split view's image closer to each other?
Hi.
When I drew brain of split view for lateral and medial views, the horizontal spacing is pretty large after save the image. Is there any method to reduce it?
code:
this_dir = opj(desc_dir, 'indvar')
for i in [1, 2, 3, 4, 5, 'all']:
brain = Brain('fsaverage', 'split', 'inflated', background='white', size=600, views=['lat', 'med'], offscreen=True)
lh_tmp = nib.load(opj(this_dir, 'lh'+str(i)+'.indvar.nii.gz')).get_fdata()
lh = np.squeeze(lh_tmp)
rh_tmp = nib.load(opj(this_dir, 'rh'+str(i)+'.indvar.nii.gz')).get_fdata()
rh = np.squeeze(rh_tmp)
brain.add_morphometry("curv", colormap="binary", min=-.8, max=.8, colorbar=False)
brain.add_data(lh, hemi='lh', max=4, min=min, name='lh', transparent=True, colormap = 'PuRd', colorbar=False)
brain.add_data(rh, hemi='rh', max=4, min=min, name='rh', transparent=True, colormap = 'PuRd', colorbar=False)
desc_fname = opj(this_dir, 'indvar'+str(i)+'.png')
brain.save_image(desc_fname)
brain.close()
Image:
Many thanks Saiwen Yu