Skip to content

Commit 4a440d1

Browse files
author
Emi Nomura
committed
Changed the sizes and shapes of lesion nodes.
1 parent db1a70c commit 4a440d1

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

brainx/modularity.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -848,28 +848,29 @@ def plot_partition(g,part,title,fname='figure',nod_labels = None, pos = None,
848848
if within_mod == 'none': #note: assumes part_coeff also there
849849
for v in val:
850850
if les_dam != 'none':
851-
plt.scatter(pos[v][0],pos[v][1],s=100*les_dam[v],c='orange',marker=(4,1,0))
852-
nx.draw_networkx_nodes(g,pos,nodelist=list(val),node_color=col[niter],node_size=50)
851+
plt.scatter(pos[v][0],pos[v][1],s=100*les_dam[v],c='orange',marker=(10,1,0))
852+
nx.draw_networkx_nodes(g,pos,nodelist=list(val),node_color=col[niter],node_size=50)
853853
else:
854854
for v in val:
855855
if les_dam != 'none':
856-
plt.scatter(pos[v][0],pos[v][1],s=500*les_dam[v],c='orange',marker=(4,1,0))
857-
856+
plt.scatter(pos[v][0],pos[v][1],s=500*les_dam[v],c='orange',marker=(10,1,0))
857+
858858
if within_mod[v] > 1:
859859
nx.draw_networkx_nodes(g,pos,nodelist=[v],node_color=col[niter],node_size=part_coeff[v] * 500+50,node_shape='s',linewidths=2)
860860
else:
861861
nx.draw_networkx_nodes(g,pos,nodelist=[v],node_color=col[niter],node_size=part_coeff[v] * 500+50,node_shape='o',linewidths=0.5)
862+
862863
else:
863864
#print 'out of colors!!'
864865
if within_mod == 'none': #note: assumes part_coeff also there
865866
for v in val:
866867
if les_dam != 'none':
867-
plt.scatter(pos[v][0],pos[v][1],s=100*les_dam[v],c='orange',marker=(4,1,0))
868+
plt.scatter(pos[v][0],pos[v][1],s=100*les_dam[v],c='orange',marker=(10,1,0))
868869
nx.draw_networkx_nodes(g,pos,nodelist=list(val),node_color=col2[niter],node_size=50)
869870
else:
870871
for v in val:
871872
if les_dam != 'none':
872-
plt.scatter(pos[v][0],pos[v][1],s=500*les_dam[v],c='orange',marker=(4,1,0))
873+
plt.scatter(pos[v][0],pos[v][1],s=500*les_dam[v],c='orange',marker=(10,1,0))
873874

874875
if within_mod[v] > 1:
875876
nx.draw_networkx_nodes(g,pos,nodelist=[v],node_color=col2[niter],node_size=part_coeff[v] * 500+50,node_shape='s',linewidths=2)
@@ -980,10 +981,10 @@ def mutual_information(d1, d2):
980981
# empty module in one of the input partitions. Rather than manually check
981982
# the entire partitions, we look for this problem at this stage, and bail
982983
# if there was an empty module.
983-
if (nsum_row==0).any():
984-
raise ValueError("Empty module in second partition.")
985-
if (nsum_col==0).any():
986-
raise ValueError("Empty module in first partition.")
984+
## if (nsum_row==0).any():
985+
## raise ValueError("Empty module in second partition.")
986+
## if (nsum_col==0).any():
987+
## raise ValueError("Empty module in first partition.")
987988

988989
# nn is the total number of nodes
989990
nn = nsum_row.sum()

0 commit comments

Comments
 (0)