help > RE: Edges: Changing Colormap Min/Max Value
Jul 30, 2016  09:07 AM | Mingrui Xia
RE: Edges: Changing Colormap Min/Max Value
Hi, 

The Option > Colormap Editor is only for the volume to surface mapping. To fix the edge color range, you have to modify the codes of BrainNet.m

in about line 420, the original codes are:
"tmp = surf.cylinder(:,5);
if max(tmp) ~=min(tmp)
k = 63 /(max(tmp)-min(tmp));
b = 64 - k*max(tmp);
else
k = 0;
b = 64;
end
tmp = round(tmp * k + b);
tmp(tmp < 1) = 1;
tmp(tmp > 64) = 64;
surf.cylinder(:,5) = tmp;"

modify them as:
"tmp = surf.cylinder(:,5);
if max(tmp) ~=min(tmp)
k = 63/(10) ;
b = 64 - k*5;
else
k = 0;
b = 64;
end
tmp = round(tmp * k + b);
tmp(tmp < 1) = 1;
tmp(tmp > 64) = 64;
surf.cylinder(:,5) = tmp;"

After these changes, Please ignore the numbers of colorbar in the final figure. Just ps it to -5 and 5, because at least four other places have to be modified to change the number. It is not necessary. 

Best,
Mingrui

Threaded View

TitleAuthorDate
Ekarin Pongpipat Jul 1, 2016
RE: Edges: Changing Colormap Min/Max Value
Mingrui Xia Jul 30, 2016
Noora T Oct 27, 2016
Mingrui Xia Oct 27, 2016
Noora T Oct 27, 2016
Mingrui Xia Oct 27, 2016
Noora T Oct 27, 2016
kara Sep 23, 2020
Mingrui Xia Sep 25, 2020
kara Sep 26, 2020
Mingrui Xia Dec 14, 2020
kara Sep 26, 2020
kara Sep 26, 2020