Skip to content

Commit aed4ed6

Browse files
committed
[FIX] Fixes pysurfer opacity bug
1 parent 8e02a5c commit aed4ed6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

netneurotools/plotting.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,15 @@ def plot_fsaverage(data, *, lhannot, rhannot, order='LR', surf='pial',
465465

466466
# finally, add data to this hemisphere!
467467
brain.add_data(vtx_data, vmin, vmax, hemi=hemi, mid=center,
468-
thresh=thresh + 0.5, alpha=alpha, remove_existing=False,
468+
thresh=thresh + 0.5, alpha=1.0, remove_existing=False,
469469
colormap=colormap, colorbar=colorbar, verbose=False)
470470

471+
if alpha != 1.0:
472+
surf = brain.data_dict[hemi]['surfaces']
473+
for n, s in enumerate(surf):
474+
s.actor.property.opacity = alpha
475+
s.render()
476+
471477
# if we have a colorbar, update parameters accordingly
472478
if colorbar:
473479
# update label format, as desired

0 commit comments

Comments
 (0)