-
Notifications
You must be signed in to change notification settings - Fork 54
/
Guide to multiNetX.tex
executable file
·556 lines (438 loc) · 17.7 KB
/
Guide to multiNetX.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
\documentclass[]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[utf8]{inputenc}
\else % if luatex or xelatex
\ifxetex
\usepackage{mathspec}
\usepackage{xltxtra,xunicode}
\else
\usepackage{fontspec}
\fi
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\newcommand{\euro}{€}
\fi
% use microtype if available
\IfFileExists{microtype.sty}{\usepackage{microtype}}{}
\usepackage{graphicx}
% Redefine \includegraphics so that, unless explicit options are
% given, the image width will not exceed the width of the page.
% Images get their normal width if they fit onto the page, but
% are scaled down if they would overflow the margins.
\makeatletter
\def\ScaleIfNeeded{%
\ifdim\Gin@nat@width>\linewidth
\linewidth
\else
\Gin@nat@width
\fi
}
\makeatother
\let\Oldincludegraphics\includegraphics
{%
\catcode`\@=11\relax%
\gdef\includegraphics{\@ifnextchar[{\Oldincludegraphics}{\Oldincludegraphics[width=\ScaleIfNeeded]}}%
}%
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
xetex]{hyperref}
\else
\usepackage[unicode=true]{hyperref}
\fi
\hypersetup{breaklinks=true,
bookmarks=true,
pdfauthor={},
pdftitle={},
colorlinks=true,
citecolor=blue,
urlcolor=blue,
linkcolor=magenta,
pdfborder={0 0 0}}
\urlstyle{same} % don't use monospace font for urls
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\setcounter{secnumdepth}{0}
\author{}
\date{}
\begin{document}
\section{Create a multiplex 1st way}\label{create-a-multiplex-1st-way}
multiNetX is a python package for the manipulation and study of
multilayer networks. The core of this package is a MultilayerGraph, a
class that inherits all properties from networkx.Graph().
This allows for:
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
Creating networks with weighted or unweighted links (only undirected
networks are supported in this version)
\item
Analysing the spectral properties of adjacency or Laplacian matrices
\item
Visualizing dynamical processes by coloring the nodes and links
accordingly
\end{itemize}
\section{How to install multiNetX}\label{how-to-install-multinetx}
multinetx does not need intallation. You simply download the source
files and save them into your file system. Then you have to add that
directory to your PYTHONPATH. In Unix/Linux you can do this by writting
in the terminal the following command:
\begin{verbatim}
export PYTHONPATH=path_to_your_python_libraries/multinetx:$PYTHONPATH
\end{verbatim}
\section{How to use multiNetX}\label{how-to-use-multinetx}
multiNetX is very easy to use. It is based on networkX package
(https://networkx.github.io/) which is written in pure python and make
use of the standard python packages numpy and scipy. Basic knowledge of
python2.7 as well as of those packages is required in order to
understand the following guide. A fundamental knowledge of network
theory is also required.
\paragraph{Import standard python packages for numerics and
plots}\label{import-standard-python-packages-for-numerics-and-plots}
\begin{verbatim}
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
\end{verbatim}
\paragraph{Import the package
multiNetX}\label{import-the-package-multinetx}
\begin{verbatim}
import multinetx as mx
\end{verbatim}
\paragraph{Create three Erd``os- R'enyi networks with N nodes for each
layer}\label{create-three-erdos--renyi-networks-with-n-nodes-for-each-layer}
\begin{verbatim}
N = 5
g1 = mx.generators.erdos_renyi_graph(N,0.9,seed=218)
g2 = mx.generators.erdos_renyi_graph(N,0.9,seed=211)
g3 = mx.generators.erdos_renyi_graph(N,0.9,seed=208)
\end{verbatim}
\paragraph{Create an 3Nx3N lil sparse matrix. It will be used to
describe the layers
interconnection}\label{create-an-3nx3n-lil-sparse-matrix.-it-will-be-used-to-describe-the-layers-interconnection}
\begin{verbatim}
adj_block = mx.lil_matrix(np.zeros((N*3,N*3)))
\end{verbatim}
\paragraph{Define the type of interconnection among the layers (here we
use identity matrices thus connecting one-to-one the nodes among
layers)}\label{define-the-type-of-interconnection-among-the-layers-here-we-use-identity-matrices-thus-connecting-one-to-one-the-nodes-among-layers}
\begin{verbatim}
adj_block[0: N, N:2*N] = np.identity(N) # L_12
adj_block[0: N,2*N:3*N] = np.identity(N) # L_13
adj_block[N:2*N,2*N:3*N] = np.identity(N) # L_23
# use symmetric inter-adjacency matrix
adj_block += adj_block.T
\end{verbatim}
\paragraph{Create an instance of the MultilayerGraph
class}\label{create-an-instance-of-the-multilayergraph-class}
\begin{verbatim}
mg = mx.MultilayerGraph(list_of_layers=[g1,g2,g3],
inter_adjacency_matrix=adj_block)
\end{verbatim}
\paragraph{Weights can be added to the
edges}\label{weights-can-be-added-to-the-edges}
\begin{verbatim}
mg.set_edges_weights(intra_layer_edges_weight=2,
inter_layer_edges_weight=3)
\end{verbatim}
\section{Create a multiplex 2nd way}\label{create-a-multiplex-2nd-way}
\paragraph{Create an empty multiplex
network}\label{create-an-empty-multiplex-network}
\begin{verbatim}
mg = mx.MultilayerGraph()
\end{verbatim}
\paragraph{Add layers}\label{add-layers}
\begin{verbatim}
mg.add_layer(mx.generators.erdos_renyi_graph(N,0.9,seed=218))
mg.add_layer(mx.generators.erdos_renyi_graph(N,0.9,seed=211))
mg.add_layer(mx.generators.erdos_renyi_graph(N,0.9,seed=208))
\end{verbatim}
\paragraph{Create an instance of the MultilayerGraph
class}\label{create-an-instance-of-the-multilayergraph-class-1}
\begin{verbatim}
mg.layers_interconnect(inter_adjacency_matrix=adj_block)
\end{verbatim}
\paragraph{Weights can be added to the
edges}\label{weights-can-be-added-to-the-edges-1}
\begin{verbatim}
mg.set_edges_weights(intra_layer_edges_weight=2,
inter_layer_edges_weight=3)
\end{verbatim}
\section{Take some information for the multiplex
network}\label{take-some-information-for-the-multiplex-network}
\begin{verbatim}
print 'MultiNetX name:\n', mg.name ,'\n', mg.info(),'\n'
MultiNetX name:
gnp_random_graph(5,0.9)
3-layer graph, intra_layer_edges:27, inter_layer_edges:15, number_of_nodes_in_layer:5
print 'MultilayerGraph edges:',\
'\n\n intra-layer edges: ',mg.get_intra_layer_edges(),\
'\n\n inter-layer edges: ',mg.get_inter_layer_edges(),'\n'
MultilayerGraph edges:
intra-layer edges: [(0, 1), (0, 2), (0, 4), (1, 2), (1, 4), (2, 3), (2, 4), (3, 4), (5, 6), (5, 7), (5, 8), (5, 9), (6, 7), (6, 8), (6, 9), (7, 8), (7, 9), (8, 9), (10, 11), (10, 12), (10, 13), (10, 14), (11, 12), (11, 13), (11, 14), (12, 13), (12, 14)]
inter-layer edges: [(5, 0), (6, 1), (7, 2), (8, 3), (9, 4), (10, 0), (10, 5), (11, 1), (11, 6), (12, 2), (12, 7), (13, 3), (13, 8), (14, 4), (14, 9)]
print 'intralayer edges of 1: ',mg.get_intra_layer_edges_of_layer(layer=0)
print 'intralayer edges of 2: ',mg.get_intra_layer_edges_of_layer(layer=1)
print 'intralayer edges of 3: ',mg.get_intra_layer_edges_of_layer(layer=2)
intralayer edges of 1: [(0, 1), (0, 2), (0, 4), (1, 2), (1, 4), (2, 3), (2, 4), (3, 4)]
intralayer edges of 2: [(5, 6), (5, 7), (5, 8), (5, 9), (6, 7), (6, 8), (6, 9), (7, 8), (7, 9), (8, 9)]
intralayer edges of 3: [(10, 11), (10, 12), (10, 13), (10, 14), (11, 12), (11, 13), (11, 14), (12, 13), (12, 14)]
\end{verbatim}
\paragraph{A layer can be chosen: it is a networkx.Graph so it inherits
all of its
properties.}\label{a-layer-can-be-chosen-it-is-a-networkx.graph-so-it-inherits-all-of-its-properties.}
\begin{verbatim}
layer = 1
mg1 = mg.get_layer(layer-1)
print 'layer', layer, ' name is', mg1.name
layer 1 name is gnp_random_graph(5,0.9)
print 'Adjacency matrix:\n', \
mx.adjacency_matrix(mg,weight=None).todense(),'\n'
print 'Adjacency matrix (weighted):\n', \
mx.adjacency_matrix(mg,weight="weight").todense(),'\n'
Adjacency matrix:
[[0 1 1 0 1 1 0 0 0 0 1 0 0 0 0]
[1 0 1 0 1 0 1 0 0 0 0 1 0 0 0]
[1 1 0 1 1 0 0 1 0 0 0 0 1 0 0]
[0 0 1 0 1 0 0 0 1 0 0 0 0 1 0]
[1 1 1 1 0 0 0 0 0 1 0 0 0 0 1]
[1 0 0 0 0 0 1 1 1 1 1 0 0 0 0]
[0 1 0 0 0 1 0 1 1 1 0 1 0 0 0]
[0 0 1 0 0 1 1 0 1 1 0 0 1 0 0]
[0 0 0 1 0 1 1 1 0 1 0 0 0 1 0]
[0 0 0 0 1 1 1 1 1 0 0 0 0 0 1]
[1 0 0 0 0 1 0 0 0 0 0 1 1 1 1]
[0 1 0 0 0 0 1 0 0 0 1 0 1 1 1]
[0 0 1 0 0 0 0 1 0 0 1 1 0 1 1]
[0 0 0 1 0 0 0 0 1 0 1 1 1 0 0]
[0 0 0 0 1 0 0 0 0 1 1 1 1 0 0]]
Adjacency matrix (weighted):
[[0 2 2 0 2 3 0 0 0 0 3 0 0 0 0]
[2 0 2 0 2 0 3 0 0 0 0 3 0 0 0]
[2 2 0 2 2 0 0 3 0 0 0 0 3 0 0]
[0 0 2 0 2 0 0 0 3 0 0 0 0 3 0]
[2 2 2 2 0 0 0 0 0 3 0 0 0 0 3]
[3 0 0 0 0 0 2 2 2 2 3 0 0 0 0]
[0 3 0 0 0 2 0 2 2 2 0 3 0 0 0]
[0 0 3 0 0 2 2 0 2 2 0 0 3 0 0]
[0 0 0 3 0 2 2 2 0 2 0 0 0 3 0]
[0 0 0 0 3 2 2 2 2 0 0 0 0 0 3]
[3 0 0 0 0 3 0 0 0 0 0 2 2 2 2]
[0 3 0 0 0 0 3 0 0 0 2 0 2 2 2]
[0 0 3 0 0 0 0 3 0 0 2 2 0 2 2]
[0 0 0 3 0 0 0 0 3 0 2 2 2 0 0]
[0 0 0 0 3 0 0 0 0 3 2 2 2 0 0]]
fig = plt.figure()
ax = fig.add_subplot(111)
ax.imshow(mx.adjacency_matrix(mg,weight=None).todense(),
origin='upper',interpolation='nearest',cmap=plt.cm.binary);
\end{verbatim}
\begin{figure}[htbp]
\centering
\includegraphics{output_35_0.png}
\caption{png}
\end{figure}
\begin{verbatim}
print 'Laplacian matrix:\n',\
mx.laplacian_matrix(mg,weight=None).todense(),'\n'
print 'Laplacian matrix (weighted):\n', \
mx.laplacian_matrix(mg,weight="weight").todense(),'\n'
Laplacian matrix:
[[ 5 -1 -1 0 -1 -1 0 0 0 0 -1 0 0 0 0]
[-1 5 -1 0 -1 0 -1 0 0 0 0 -1 0 0 0]
[-1 -1 6 -1 -1 0 0 -1 0 0 0 0 -1 0 0]
[ 0 0 -1 4 -1 0 0 0 -1 0 0 0 0 -1 0]
[-1 -1 -1 -1 6 0 0 0 0 -1 0 0 0 0 -1]
[-1 0 0 0 0 6 -1 -1 -1 -1 -1 0 0 0 0]
[ 0 -1 0 0 0 -1 6 -1 -1 -1 0 -1 0 0 0]
[ 0 0 -1 0 0 -1 -1 6 -1 -1 0 0 -1 0 0]
[ 0 0 0 -1 0 -1 -1 -1 6 -1 0 0 0 -1 0]
[ 0 0 0 0 -1 -1 -1 -1 -1 6 0 0 0 0 -1]
[-1 0 0 0 0 -1 0 0 0 0 6 -1 -1 -1 -1]
[ 0 -1 0 0 0 0 -1 0 0 0 -1 6 -1 -1 -1]
[ 0 0 -1 0 0 0 0 -1 0 0 -1 -1 6 -1 -1]
[ 0 0 0 -1 0 0 0 0 -1 0 -1 -1 -1 5 0]
[ 0 0 0 0 -1 0 0 0 0 -1 -1 -1 -1 0 5]]
Laplacian matrix (weighted):
[[12 -2 -2 0 -2 -3 0 0 0 0 -3 0 0 0 0]
[-2 12 -2 0 -2 0 -3 0 0 0 0 -3 0 0 0]
[-2 -2 14 -2 -2 0 0 -3 0 0 0 0 -3 0 0]
[ 0 0 -2 10 -2 0 0 0 -3 0 0 0 0 -3 0]
[-2 -2 -2 -2 14 0 0 0 0 -3 0 0 0 0 -3]
[-3 0 0 0 0 14 -2 -2 -2 -2 -3 0 0 0 0]
[ 0 -3 0 0 0 -2 14 -2 -2 -2 0 -3 0 0 0]
[ 0 0 -3 0 0 -2 -2 14 -2 -2 0 0 -3 0 0]
[ 0 0 0 -3 0 -2 -2 -2 14 -2 0 0 0 -3 0]
[ 0 0 0 0 -3 -2 -2 -2 -2 14 0 0 0 0 -3]
[-3 0 0 0 0 -3 0 0 0 0 14 -2 -2 -2 -2]
[ 0 -3 0 0 0 0 -3 0 0 0 -2 14 -2 -2 -2]
[ 0 0 -3 0 0 0 0 -3 0 0 -2 -2 14 -2 -2]
[ 0 0 0 -3 0 0 0 0 -3 0 -2 -2 -2 12 0]
[ 0 0 0 0 -3 0 0 0 0 -3 -2 -2 -2 0 12]]
fig = plt.figure()
ax = fig.add_subplot(111)
ax.imshow(mx.laplacian_matrix(mg,weight=None).todense(),
origin='upper',interpolation='nearest',cmap=plt.cm.binary);
\end{verbatim}
\begin{figure}[htbp]
\centering
\includegraphics{output_37_0.png}
\caption{png}
\end{figure}
\begin{verbatim}
print 'Laplacian spectrum:\n', \
mx.laplacian_spectrum(mg,weight="weight"),'\n'
Laplacian spectrum:
[ 7.29267473e-15 6.55428082e+00 8.90511420e+00 9.00000000e+00
9.00000000e+00 9.22799813e+00 1.00000000e+01 1.51991214e+01
1.73414836e+01 1.77720019e+01 1.90000000e+01 1.90000000e+01
1.90000000e+01 1.90000000e+01 1.90000000e+01]
\end{verbatim}
\section{Plot Multiplex}\label{plot-multiplex}
\subsubsection{Edge colored nertwork (no inter-connected
layers)}\label{edge-colored-nertwork-no-inter-connected-layers}
\subparagraph{Create a multiplex network with three random
layers}\label{create-a-multiplex-network-with-three-random-layers}
\begin{verbatim}
mg = mx.MultilayerGraph()
N = 50
mg.add_layer(mx.generators.erdos_renyi_graph(N,0.07,seed=218))
mg.add_layer(mx.generators.erdos_renyi_graph(N,0.07,seed=211))
mg.add_layer(mx.generators.erdos_renyi_graph(N,0.07,seed=208))
\end{verbatim}
\subparagraph{Set weights to the edges}\label{set-weights-to-the-edges}
\begin{verbatim}
mg.set_intra_edges_weights(layer=0,weight=1)
mg.set_intra_edges_weights(layer=1,weight=2)
mg.set_intra_edges_weights(layer=2,weight=3)
fig = plt.figure(figsize=(15,5))
ax1 = fig.add_subplot(121)
ax1.imshow(mx.adjacency_matrix(mg,weight='weight').todense(),
origin='upper',interpolation='nearest',cmap=plt.cm.jet_r)
ax1.set_title('supra adjacency matrix')
ax2 = fig.add_subplot(122)
ax2.axis('off')
ax2.set_title('edge colored network')
pos = mx.get_position(mg,mx.fruchterman_reingold_layout(mg.get_layer(0)),
layer_vertical_shift=0.2,
layer_horizontal_shift=0.0,
proj_angle=47)
mx.draw_networkx(mg,pos=pos,ax=ax2,node_size=50,with_labels=False,
edge_color=[mg[a][b]['weight'] for a,b in mg.edges()],
edge_cmap=plt.cm.jet_r)
plt.show()
\end{verbatim}
\begin{figure}[htbp]
\centering
\includegraphics{output_46_0.png}
\caption{png}
\end{figure}
\subsubsection{Regular interconnected
multiplex}\label{regular-interconnected-multiplex}
\subparagraph{Define the type of interconnection between the
layers}\label{define-the-type-of-interconnection-between-the-layers}
\begin{verbatim}
adj_block = mx.lil_matrix(np.zeros((N*3,N*3)))
adj_block[0: N, N:2*N] = np.identity(N) # L_12
adj_block[0: N,2*N:3*N] = np.identity(N) # L_13
#adj_block[N:2*N,2*N:3*N] = np.identity(N) # L_23
adj_block += adj_block.T
mg.layers_interconnect(inter_adjacency_matrix=adj_block)
mg.set_edges_weights(inter_layer_edges_weight=4)
mg.set_intra_edges_weights(layer=0,weight=1)
mg.set_intra_edges_weights(layer=1,weight=2)
mg.set_intra_edges_weights(layer=2,weight=3)
fig = plt.figure(figsize=(15,5))
ax1 = fig.add_subplot(121)
ax1.imshow(mx.adjacency_matrix(mg,weight='weight').todense(),
origin='upper',interpolation='nearest',cmap=plt.cm.jet_r)
ax1.set_title('supra adjacency matrix')
ax2 = fig.add_subplot(122)
ax2.axis('off')
ax2.set_title('regular interconnected network')
pos = mx.get_position(mg,mx.fruchterman_reingold_layout(mg.get_layer(0)),
layer_vertical_shift=1.4,
layer_horizontal_shift=0.0,
proj_angle=7)
mx.draw_networkx(mg,pos=pos,ax=ax2,node_size=50,with_labels=False,
edge_color=[mg[a][b]['weight'] for a,b in mg.edges()],
edge_cmap=plt.cm.jet_r)
plt.show()
\end{verbatim}
\begin{figure}[htbp]
\centering
\includegraphics{output_51_0.png}
\caption{png}
\end{figure}
\subsubsection{General multiplex}\label{general-multiplex}
\begin{verbatim}
adj_block = mx.lil_matrix(np.zeros((N*4,N*4)))
adj_block[0 : N , N:2*N] = np.identity(N) # L_12
adj_block[0 : N , 2*N:3*N] = np.random.poisson(0.005,size=(N,N)) # L_13
adj_block[0 : N , 3*N:4*N] = np.random.poisson(0.006,size=(N,N)) # L_34
adj_block[3*N:4*N , 2*N:3*N] = np.random.poisson(0.008,size=(N,N)) # L_14
adj_block += adj_block.T
adj_block[adj_block>1] = 1
\end{verbatim}
\subparagraph{Add one more layer}\label{add-one-more-layer}
\begin{verbatim}
mg.add_layer(mx.generators.erdos_renyi_graph(N,0.1,seed=218))
mg.layers_interconnect(inter_adjacency_matrix=adj_block)
mg.set_edges_weights(inter_layer_edges_weight=5)
mg.set_intra_edges_weights(layer=0,weight=1)
mg.set_intra_edges_weights(layer=1,weight=2)
mg.set_intra_edges_weights(layer=2,weight=3)
mg.set_intra_edges_weights(layer=3,weight=4)
fig = plt.figure(figsize=(15,5))
ax1 = fig.add_subplot(121)
ax1.imshow(mx.adjacency_matrix(mg,weight='weight').todense(),
origin='upper',interpolation='nearest',cmap=plt.cm.jet_r)
ax1.set_title('supra adjacency matrix')
ax2 = fig.add_subplot(122)
ax2.axis('off')
ax2.set_title('general multiplex network')
pos = mx.get_position(mg,mx.fruchterman_reingold_layout(mg.get_layer(0)),
layer_vertical_shift=.4,
layer_horizontal_shift=1.2,
proj_angle=.2)
mx.draw_networkx(mg,pos=pos,ax=ax2,node_size=50,with_labels=False,
edge_color=[mg[a][b]['weight'] for a,b in mg.edges()],
edge_cmap=plt.cm.jet_r)
plt.show()
\end{verbatim}
\begin{figure}[htbp]
\centering
\includegraphics{output_57_0.png}
\caption{png}
\end{figure}
\section{Copyright}\label{copyright}
\begin{enumerate}
\def\labelenumi{(\Alph{enumi})}
\setcounter{enumi}{2}
\itemsep1pt\parskip0pt\parsep0pt
\item
Copyright 2013-2019, Nikos E Kouvaris
\end{enumerate}
Each file in this folder is part of the multiNetX package.
multiNetX is part of the deliverables of the LASAGNE project
(multi-LAyer SpAtiotemporal Generalized NEtworks),
EU/FP7-2012-STREP-318132
(http://complex.ffn.ub.es/\textasciitilde{}lasagne/)
multiNetX is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
multiNetX is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see \url{http://www.gnu.org/licenses/}.
\end{document}