From 082e3be0d5d2f1892395693880d11a58d42a032c Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Wed, 12 Jul 2017 16:10:09 -0400 Subject: [PATCH] Handle undefind vertices in parcellation example --- examples/plot_parc_values.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/plot_parc_values.py b/examples/plot_parc_values.py index 916e4cf..ab53fdb 100644 --- a/examples/plot_parc_values.py +++ b/examples/plot_parc_values.py @@ -45,9 +45,14 @@ """ vtx_data = roi_data[labels] +""" +Handle vertices that are not defined in the annotation. +""" +vtx_data[labels == -1] = -1 + """ Display these values on the brain. Use a sequential colormap (assuming these data move from low to high values), and add an alpha channel so the underlying anatomy is visible. """ -brain.add_data(vtx_data, .5, .75, colormap="rocket", alpha=.8) +brain.add_data(vtx_data, .5, .75, thresh=0, colormap="rocket", alpha=.8)