In [2]:
    
from tvb.simulator.lab import *
    
In [3]:
    
LOG.info("Reading default connectivity...")
    
In [4]:
    
#Initialise an empty Connectivity object
wm = connectivity.Connectivity()
    
In [5]:
    
# First weights and distances
nor = 4
wm.motif_all_to_all(number_of_regions=nor)
    
In [6]:
    
# Centres, specify the number of regions, otherwise it'll use a default value.
# If we have spherical centres, the orientations will also be created.
wm.centres_spherical(number_of_regions=nor)
    
In [7]:
    
# By default, the new regions labels are numeric characters, ie [0, 1, ...]
# It is possible to get alphabetic characters.
wm.create_region_labels(mode='alphabetic')
    
In [8]:
    
# Or creating your own
my_labels = numpy.array(['a1', 'b1', 'a2', 'b2'])
wm.region_labels = my_labels
    
In [9]:
    
wm.configure()
    
In [10]:
    
plot_matrix(wm.weights, connectivity=wm, binary_matrix=True)
show()