help > color of nodes and edges
Showing 1-6 of 6 posts
Display:
Results per page:
Jan 27, 2017  04:01 PM | Heidi Jacobs - MGH
color of nodes and edges
Hi

I have just started using Brainnet viewer for structural analyses and would like to change the color of the nodes and edges.
For example, for one brain image I would like to color the edges and nodes blue, but for another image, I would like to color them in red.

Whatever I do, Brainnet viewer always goes to red as primary color.
I have tried to change the color in the node file to 5 (for all nodes), but it still only provides me with a red option.

Any suggestions on how I can change this?

Many thanks
Heidi
Jan 27, 2017  11:01 PM | Mingrui Xia
RE: color of nodes and edges
Hi Heidi

Please right click the color square in the option panel to change color. 

Best,
Mingrui
Aug 19, 2019  04:08 PM | Edward Chou
RE: color of nodes and edges
Originally posted by Mingrui Xia:
Hi Heidi

Please right click the color square in the option panel to change color. 

Best,
Mingrui


Hi Mingrui,

I am encountering the same issue (I am trying to change the nodes to black). I tried to right click the color square but this I get the following error:

Error using matlab.ui.internal.dialog.WebColorChooser/show (line 72)
Java exception occurred:
com.mathworks.html.BrowserCreationException: com.mathworks.html.BrowserCreationException:
java.lang.NoClassDefFoundError: Could not initialize class com.teamdev.jxbrowser.chromium.BrowserContext
at
com.mathworks.mlwidgets.html.LightweightBrowserBuilder.buildBrowser(LightweightBrowserBuilder.java:87)
at
com.mathworks.mlwidgets.html.LightweightBrowserBuilder.buildDefaultBrowser(LightweightBrowserBuilder.java:52)
at
com.mathworks.mlwidgets.html.LightweightBrowserFactory.createLightweightBrowser(LightweightBrowserFactory.java:36)
Caused by: com.mathworks.html.BrowserCreationException: java.lang.NoClassDefFoundError: Could not
initialize class com.teamdev.jxbrowser.chromium.BrowserContext
at
com.mathworks.html.jxbrowser.chromium.LightweightChromiumBrowser.(LightweightChromiumBrowser.java:38)
at
com.mathworks.mlwidgets.html.LightweightBrowserBuilder.buildBrowser(LightweightBrowserBuilder.java:78)
... 2 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
com.teamdev.jxbrowser.chromium.BrowserContext
at com.teamdev.jxbrowser.chromium.Browser.(Unknown Source)
at com.mathworks.html.jxbrowser.chromium.BrowserViewBuilder.buildBrowser(BrowserViewBuilder.java:77)
at com.mathworks.html.jxbrowser.chromium.BrowserViewBuilder.createBrowser(BrowserViewBuilder.java:32)
at
com.mathworks.html.jxbrowser.chromium.LightweightChromiumBrowser.(LightweightChromiumBrowser.java:36)
... 3 more

Error in uisetcolor_helper>showDialog (line 67)
ccDialog.show;
Error in uisetcolor_helper (line 12)
selectedColor = showDialog(ccDialog);
Error in uisetcolor (line 33)
selectedColor = uisetcolor_helper(varargin{:});
Error in BrainNet_Option>NodCS_pushbutton_ButtonDownFcn (line 2569)
c=uisetcolor('Select Color');
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainNet_Option (line 54)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainNet_Option('NodCS_pushbutton_ButtonDownFcn',hObject,eventdata,guidata(hObject))
Error using uiwait (line 81)
Error while evaluating UIControl ButtonDownFcn.

I am using Matlab R2017b in Ubuntu Mate (Linux).

Any help would be appreciated, thanks.
Edward
Sep 1, 2019  06:09 PM | Mingrui Xia
RE: color of nodes and edges
Hi Edward, 

Would you please try the latest version of BNV? We have changed all the color square to button, and just click it to change colors. 

Best,
Mingrui
Originally posted by Edward Chou:
Originally posted by Mingrui Xia:
Hi Heidi

Please right click the color square in the option panel to change color. 

Best,
Mingrui


Hi Mingrui,

I am encountering the same issue (I am trying to change the nodes to black). I tried to right click the color square but this I get the following error:

Error using matlab.ui.internal.dialog.WebColorChooser/show (line 72)
Java exception occurred:
com.mathworks.html.BrowserCreationException: com.mathworks.html.BrowserCreationException:
java.lang.NoClassDefFoundError: Could not initialize class com.teamdev.jxbrowser.chromium.BrowserContext
at
com.mathworks.mlwidgets.html.LightweightBrowserBuilder.buildBrowser(LightweightBrowserBuilder.java:87)
at
com.mathworks.mlwidgets.html.LightweightBrowserBuilder.buildDefaultBrowser(LightweightBrowserBuilder.java:52)
at
com.mathworks.mlwidgets.html.LightweightBrowserFactory.createLightweightBrowser(LightweightBrowserFactory.java:36)
Caused by: com.mathworks.html.BrowserCreationException: java.lang.NoClassDefFoundError: Could not
initialize class com.teamdev.jxbrowser.chromium.BrowserContext
at
com.mathworks.html.jxbrowser.chromium.LightweightChromiumBrowser.(LightweightChromiumBrowser.java:38)
at
com.mathworks.mlwidgets.html.LightweightBrowserBuilder.buildBrowser(LightweightBrowserBuilder.java:78)
... 2 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
com.teamdev.jxbrowser.chromium.BrowserContext
at com.teamdev.jxbrowser.chromium.Browser.(Unknown Source)
at com.mathworks.html.jxbrowser.chromium.BrowserViewBuilder.buildBrowser(BrowserViewBuilder.java:77)
at com.mathworks.html.jxbrowser.chromium.BrowserViewBuilder.createBrowser(BrowserViewBuilder.java:32)
at
com.mathworks.html.jxbrowser.chromium.LightweightChromiumBrowser.(LightweightChromiumBrowser.java:36)
... 3 more

Error in uisetcolor_helper>showDialog (line 67)
ccDialog.show;
Error in uisetcolor_helper (line 12)
selectedColor = showDialog(ccDialog);
Error in uisetcolor (line 33)
selectedColor = uisetcolor_helper(varargin{:});
Error in BrainNet_Option>NodCS_pushbutton_ButtonDownFcn (line 2569)
c=uisetcolor('Select Color');
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainNet_Option (line 54)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainNet_Option('NodCS_pushbutton_ButtonDownFcn',hObject,eventdata,guidata(hObject))
Error using uiwait (line 81)
Error while evaluating UIControl ButtonDownFcn.

I am using Matlab R2017b in Ubuntu Mate (Linux).

Any help would be appreciated, thanks.
Edward
Sep 8, 2019  10:09 PM | Edward Chou
RE: color of nodes and edges
Hi Mingrui, thanks for the reply. Sorry for the delay from my end- just saw this today.

I am using BrainNet Viewer version 1.63 (20181219). The error message I pasted actually shows up when I try to use the button you described to change colors.

I've looked into it more and it seems like a Matlab uisetcolor issue rather than a BrainNet issue. I'll try and test the solutions below, and if they don't work, I'll give you an update here.

https://mathworks.com/matlabcentral/answ...
https://mathworks.com/matlabcentral/answ...

Kind Regards,
Edward
Sep 10, 2019  01:09 AM | Edward Chou
RE: color of nodes and edges
Originally posted by Edward Chou:
Hi Mingrui, thanks for the reply. Sorry for the delay from my end- just saw this today.

I am using BrainNet Viewer version 1.63 (20181219). The error message I pasted actually shows up when I try to use the button you described to change colors.

I've looked into it more and it seems like a Matlab uisetcolor issue rather than a BrainNet issue. I'll try and test the solutions below, and if they don't work, I'll give you an update here.

https://mathworks.com/matlabcentral/answ...
https://mathworks.com/matlabcentral/answ...

Kind Regards,
Edward
I can confirm that this was indeed the issue (a Matlab rather than a BrainNet issue). Thanks for all your hard work making this program.