Toolkit for TCS 2021 - Drawing Graphs using Laplacian Eigenvectors

Jupyter Notebook for Spectral Methods module of course using the tools developed by Dan Spielman. References and sources:

Table of Contents

  1. Line Graphs

  2. Grid Graphs

  3. Platonic Solids

In [1]:
using Laplacians
using LinearAlgebra
using Statistics
using Plots
using SparseArrays
using FileIO
using JLD2
using Random

Line Graphs

In [2]:
M = path_graph(12)
Out[2]:
12×12 SparseMatrixCSC{Float64,Int64} with 22 stored entries:
  [2 ,  1]  =  1.0
  [1 ,  2]  =  1.0
  [3 ,  2]  =  1.0
  [2 ,  3]  =  1.0
  [4 ,  3]  =  1.0
  [3 ,  4]  =  1.0
  [5 ,  4]  =  1.0
  [4 ,  5]  =  1.0
  [6 ,  5]  =  1.0
  [5 ,  6]  =  1.0
  [7 ,  6]  =  1.0
  [6 ,  7]  =  1.0
  [8 ,  7]  =  1.0
  [7 ,  8]  =  1.0
  [9 ,  8]  =  1.0
  [8 ,  9]  =  1.0
  [10,  9]  =  1.0
  [9 , 10]  =  1.0
  [11, 10]  =  1.0
  [10, 11]  =  1.0
  [12, 11]  =  1.0
  [11, 12]  =  1.0
In [3]:
Matrix(M)
Out[3]:
12×12 Array{Float64,2}:
 0.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 1.0  0.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  1.0  0.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  1.0  0.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  1.0  0.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  1.0  0.0  1.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  1.0  0.0  1.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  1.0  0.0  1.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  1.0  0.0  1.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  1.0  0.0  1.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  1.0  0.0  1.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  1.0  0.0
In [4]:
L=Matrix(lap(M))
Out[4]:
12×12 Array{Float64,2}:
  1.0  -1.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0
 -1.0   2.0  -1.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0
  0.0  -1.0   2.0  -1.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0
  0.0   0.0  -1.0   2.0  -1.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0
  0.0   0.0   0.0  -1.0   2.0  -1.0   0.0   0.0   0.0   0.0   0.0   0.0
  0.0   0.0   0.0   0.0  -1.0   2.0  -1.0   0.0   0.0   0.0   0.0   0.0
  0.0   0.0   0.0   0.0   0.0  -1.0   2.0  -1.0   0.0   0.0   0.0   0.0
  0.0   0.0   0.0   0.0   0.0   0.0  -1.0   2.0  -1.0   0.0   0.0   0.0
  0.0   0.0   0.0   0.0   0.0   0.0   0.0  -1.0   2.0  -1.0   0.0   0.0
  0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0  -1.0   2.0  -1.0   0.0
  0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0  -1.0   2.0  -1.0
  0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0  -1.0   1.0
In [5]:
E = eigen(Matrix(L))
println(E.values)
[4.44089e-16, 0.0681483, 0.267949, 0.585786, 1.0, 1.48236, 2.0, 2.51764, 3.0, 3.41421, 3.73205, 3.93185]
In [6]:
E.vectors[:,1]
Out[6]:
12-element Array{Float64,1}:
 0.2886751345947995 
 0.28867513459479993
 0.28867513459480265
 0.28867513459480676
 0.28867513459481003
 0.2886751345948136 
 0.28867513459481625
 0.28867513459481875
 0.28867513459482125
 0.2886751345948228 
 0.2886751345948225 
 0.28867513459482075
In [7]:
v2 = E.vectors[:,2]
Out[7]:
12-element Array{Float64,1}:
 -0.4047556697450445  
 -0.37717223974229014 
 -0.323885144907698   
 -0.24852581269315674 
 -0.15622985705190004 
 -0.053287094834602464
  0.0532870948345858  
  0.1562298570518848  
  0.24852581269314367 
  0.32388514490768794 
  0.37717223974228026 
  0.4047556697450318  
In [8]:
plot(v2,marker=5,legend=false)
xlabel!("vertex number")
ylabel!("value in eigenvector")
Out[8]:
2.5 5.0 7.5 10.0 -0.4 -0.2 0.0 0.2 0.4 vertex number value in eigenvector
In [9]:
Plots.plot(E.vectors[:,1],label="v1",marker = 5)
Plots.plot!(E.vectors[:,2],label="v2",marker = 5)
Plots.plot!(E.vectors[:,3],label="v3",marker = 5)
Plots.plot!(E.vectors[:,4],label="v4",marker = 5)
xlabel!("Vertex Number")
ylabel!("Value in Eigenvector")
Out[9]:
2.5 5.0 7.5 10.0 -0.4 -0.2 0.0 0.2 0.4 Vertex Number Value in Eigenvector v1 v2 v3 v4
In [10]:
Plots.plot(E.vectors[:,12],label="v12",marker=5)
xlabel!("Vertex Number")
ylabel!("Value in Eigenvector")
Out[10]:
2.5 5.0 7.5 10.0 -0.4 -0.2 0.0 0.2 0.4 Vertex Number Value in Eigenvector v12
In [11]:
using PyPlot: pygui
pygui(false)
plot_graph(M,E.vectors[:,2],E.vectors[:,3])
Out[11]:
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.lines.Line2D object at 0x7f8a5c99af98>

Grid Graphs

In [12]:
M = grid2(7,7)
L = lap(M)
E = eigen(Matrix(L))
V = E.vectors[:,2:3]
println(E.values)
[4.96632e-16, 0.198062, 0.198062, 0.396125, 0.75302, 0.75302, 0.951083, 0.951083, 1.50604, 1.55496, 1.55496, 1.75302, 1.75302, 2.30798, 2.30798, 2.44504, 2.44504, 2.6431, 2.6431, 3.10992, 3.19806, 3.19806, 3.24698, 3.24698, 3.44504, 3.44504, 3.80194, 3.80194, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.55496, 4.55496, 4.80194, 4.80194, 4.89008, 5.3569, 5.3569, 5.69202, 5.69202, 6.24698, 6.24698, 6.49396, 7.04892, 7.04892, 7.60388]
In [110]:
pygui(false)
plot_graph(M,V[:,1],V[:,2])
Out[110]:
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.lines.Line2D object at 0x7f8b428146a0>
In [13]:
M = grid3(10,10,10)
L = lap(M)
E = eigen(Matrix(L))
V = E.vectors[:,2:3]
println(E.values)
[3.67625e-16, 0.097887, 0.097887, 0.097887, 0.195774, 0.195774, 0.195774, 0.293661, 0.381966, 0.381966, 0.381966, 0.479853, 0.479853, 0.479853, 0.479853, 0.479853, 0.479853, 0.57774, 0.57774, 0.57774, 0.763932, 0.763932, 0.763932, 0.824429, 0.824429, 0.824429, 0.861819, 0.861819, 0.861819, 0.922316, 0.922316, 0.922316, 0.922316, 0.922316, 0.922316, 1.0202, 1.0202, 1.0202, 1.1459, 1.2064, 1.2064, 1.2064, 1.2064, 1.2064, 1.2064, 1.30428, 1.30428, 1.30428, 1.30428, 1.30428, 1.30428, 1.38197, 1.38197, 1.38197, 1.47985, 1.47985, 1.47985, 1.47985, 1.47985, 1.47985, 1.57774, 1.57774, 1.57774, 1.58836, 1.58836, 1.58836, 1.64886, 1.64886, 1.64886, 1.74675, 1.74675, 1.74675, 1.76393, 1.76393, 1.76393, 1.76393, 1.76393, 1.76393, 1.86182, 1.86182, 1.86182, 1.86182, 1.86182, 1.86182, 2.0, 2.0, 2.0, 2.03083, 2.03083, 2.03083, 2.09789, 2.09789, 2.09789, 2.09789, 2.09789, 2.09789, 2.1459, 2.1459, 2.1459, 2.19577, 2.19577, 2.19577, 2.2064, 2.2064, 2.2064, 2.2064, 2.2064, 2.2064, 2.30428, 2.30428, 2.30428, 2.30428, 2.30428, 2.30428, 2.38197, 2.38197, 2.38197, 2.38197, 2.38197, 2.38197, 2.47329, 2.47985, 2.47985, 2.47985, 2.47985, 2.47985, 2.47985, 2.58836, 2.58836, 2.58836, 2.58836, 2.58836, 2.58836, 2.61803, 2.61803, 2.61803, 2.71592, 2.71592, 2.71592, 2.71592, 2.71592, 2.71592, 2.76393, 2.76393, 2.76393, 2.76393, 2.76393, 2.76393, 2.81381, 2.81381, 2.81381, 2.82443, 2.82443, 2.82443, 2.82443, 2.82443, 2.82443, 2.86182, 2.86182, 2.86182, 2.92232, 2.92232, 2.92232, 2.92232, 2.92232, 2.92232, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.03083, 3.03083, 3.03083, 3.09789, 3.09789, 3.09789, 3.09789, 3.09789, 3.09789, 3.1459, 3.1459, 3.1459, 3.17557, 3.17557, 3.17557, 3.2064, 3.2064, 3.2064, 3.2064, 3.2064, 3.2064, 3.27346, 3.27346, 3.27346, 3.27346, 3.27346, 3.27346, 3.37134, 3.37134, 3.37134, 3.38197, 3.38197, 3.38197, 3.38197, 3.38197, 3.38197, 3.38197, 3.38197, 3.38197, 3.44246, 3.44246, 3.44246, 3.44246, 3.44246, 3.44246, 3.47985, 3.47985, 3.47985, 3.47985, 3.47985, 3.47985, 3.54035, 3.54035, 3.54035, 3.54035, 3.54035, 3.54035, 3.55754, 3.55754, 3.55754, 3.55754, 3.55754, 3.55754, 3.58836, 3.58836, 3.58836, 3.61803, 3.61803, 3.61803, 3.64886, 3.64886, 3.64886, 3.65542, 3.65542, 3.65542, 3.65542, 3.65542, 3.65542, 3.71592, 3.71592, 3.71592, 3.71592, 3.71592, 3.71592, 3.76393, 3.76393, 3.76393, 3.76393, 3.76393, 3.76393, 3.81381, 3.81381, 3.81381, 3.82443, 3.82443, 3.82443, 3.82443, 3.82443, 3.82443, 3.90211, 3.90211, 3.90211, 3.9395, 3.9395, 3.9395, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.09789, 4.1459, 4.2064, 4.2064, 4.2064, 4.2064, 4.2064, 4.2064, 4.26689, 4.26689, 4.26689, 4.28408, 4.28408, 4.28408, 4.28408, 4.28408, 4.28408, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.38197, 4.44246, 4.44246, 4.44246, 4.44246, 4.44246, 4.44246, 4.54035, 4.54035, 4.54035, 4.54035, 4.54035, 4.54035, 4.55754, 4.55754, 4.55754, 4.55754, 4.55754, 4.55754, 4.61803, 4.61803, 4.61803, 4.61803, 4.61803, 4.61803, 4.65542, 4.65542, 4.65542, 4.65542, 4.65542, 4.65542, 4.66605, 4.66605, 4.66605, 4.71592, 4.71592, 4.71592, 4.71592, 4.71592, 4.71592, 4.72654, 4.72654, 4.72654, 4.72654, 4.72654, 4.72654, 4.76393, 4.76393, 4.76393, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.82443, 4.9395, 4.9395, 4.9395, 4.9395, 4.9395, 4.9395, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.09789, 5.09789, 5.09789, 5.09789, 5.09789, 5.09789, 5.10851, 5.10851, 5.10851, 5.10851, 5.10851, 5.10851, 5.17557, 5.17557, 5.17557, 5.17557, 5.17557, 5.17557, 5.23607, 5.23607, 5.23607, 5.26689, 5.26689, 5.26689, 5.27346, 5.27346, 5.27346, 5.27346, 5.27346, 5.27346, 5.28408, 5.28408, 5.28408, 5.28408, 5.28408, 5.28408, 5.33395, 5.33395, 5.33395, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.38197, 5.44246, 5.44246, 5.44246, 5.44246, 5.44246, 5.44246, 5.55097, 5.55097, 5.55097, 5.55754, 5.55754, 5.55754, 5.55754, 5.55754, 5.55754, 5.61803, 5.61803, 5.61803, 5.61803, 5.61803, 5.61803, 5.61803, 5.61803, 5.61803, 5.66605, 5.66605, 5.66605, 5.66605, 5.66605, 5.66605, 5.71592, 5.71592, 5.71592, 5.71592, 5.71592, 5.71592, 5.7936, 5.7936, 5.7936, 5.7936, 5.7936, 5.7936, 5.82443, 5.82443, 5.82443, 5.82443, 5.82443, 5.82443, 5.89149, 5.89149, 5.89149, 5.89149, 5.89149, 5.89149, 5.90211, 5.90211, 5.90211, 5.90211, 5.90211, 5.90211, 5.9395, 5.9395, 5.9395, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0605, 6.0605, 6.0605, 6.10851, 6.10851, 6.10851, 6.10851, 6.10851, 6.10851, 6.17557, 6.17557, 6.17557, 6.17557, 6.17557, 6.17557, 6.23607, 6.23607, 6.23607, 6.23607, 6.23607, 6.23607, 6.28408, 6.28408, 6.28408, 6.28408, 6.28408, 6.28408, 6.33395, 6.33395, 6.33395, 6.33395, 6.33395, 6.33395, 6.35114, 6.35114, 6.35114, 6.38197, 6.38197, 6.38197, 6.44246, 6.44246, 6.44246, 6.44246, 6.44246, 6.44246, 6.44903, 6.44903, 6.44903, 6.52015, 6.52015, 6.52015, 6.52015, 6.52015, 6.52015, 6.55754, 6.55754, 6.55754, 6.55754, 6.55754, 6.55754, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.61803, 6.66605, 6.66605, 6.66605, 6.72654, 6.72654, 6.72654, 6.72654, 6.72654, 6.72654, 6.73311, 6.73311, 6.73311, 6.7936, 6.7936, 6.7936, 6.7936, 6.7936, 6.7936, 6.89149, 6.89149, 6.89149, 6.89149, 6.89149, 6.89149, 6.90211, 6.90211, 6.90211, 6.90211, 6.90211, 6.90211, 7.0, 7.0, 7.0, 7.0, 7.0, 7.0, 7.0605, 7.0605, 7.0605, 7.0605, 7.0605, 7.0605, 7.07768, 7.07768, 7.07768, 7.07768, 7.07768, 7.07768, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.17557, 7.23607, 7.23607, 7.23607, 7.23607, 7.23607, 7.23607, 7.28408, 7.28408, 7.28408, 7.28408, 7.28408, 7.28408, 7.33395, 7.33395, 7.33395, 7.34458, 7.34458, 7.34458, 7.34458, 7.34458, 7.34458, 7.45965, 7.45965, 7.45965, 7.45965, 7.45965, 7.45965, 7.52015, 7.52015, 7.52015, 7.52015, 7.52015, 7.52015, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.61803, 7.73311, 7.73311, 7.73311, 7.7936, 7.7936, 7.7936, 7.7936, 7.7936, 7.7936, 7.80423, 7.80423, 7.80423, 7.8541, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 7.90211, 8.0605, 8.0605, 8.0605, 8.17557, 8.17557, 8.17557, 8.17557, 8.17557, 8.17557, 8.18619, 8.18619, 8.18619, 8.23607, 8.23607, 8.23607, 8.23607, 8.23607, 8.23607, 8.34458, 8.34458, 8.34458, 8.34458, 8.34458, 8.34458, 8.35114, 8.35114, 8.35114, 8.41164, 8.41164, 8.41164, 8.45965, 8.45965, 8.45965, 8.45965, 8.45965, 8.45965, 8.52015, 8.52015, 8.52015, 8.52015, 8.52015, 8.52015, 8.61803, 8.61803, 8.61803, 8.62866, 8.62866, 8.62866, 8.7936, 8.7936, 8.7936, 8.7936, 8.7936, 8.7936, 8.8541, 8.8541, 8.8541, 8.90211, 8.90211, 8.90211, 8.90211, 8.90211, 8.90211, 8.96917, 8.96917, 8.96917, 9.07768, 9.07768, 9.07768, 9.07768, 9.07768, 9.07768, 9.13818, 9.13818, 9.13818, 9.18619, 9.18619, 9.18619, 9.23607, 9.23607, 9.23607, 9.41164, 9.41164, 9.41164, 9.41164, 9.41164, 9.41164, 9.52015, 9.52015, 9.52015, 9.52015, 9.52015, 9.52015, 9.52671, 9.69572, 9.69572, 9.69572, 9.69572, 9.69572, 9.69572, 9.80423, 9.80423, 9.80423, 9.8541, 9.8541, 9.8541, 9.96917, 9.96917, 9.96917, 10.1382, 10.1382, 10.1382, 10.1382, 10.1382, 10.1382, 10.2533, 10.2533, 10.2533, 10.4116, 10.4116, 10.4116, 10.4223, 10.4223, 10.4223, 10.6957, 10.6957, 10.6957, 10.6957, 10.6957, 10.6957, 10.8541, 10.9798, 10.9798, 10.9798, 11.1382, 11.1382, 11.1382, 11.4223, 11.4223, 11.4223, 11.7063]
In [14]:
pygui(false)
plot_graph(M,V[:,1],V[:,2])
Out[14]:
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.lines.Line2D object at 0x7f8a5e980d68>
In [15]:
x = E.vectors[:,2]
y = E.vectors[:,3]
z = E.vectors[:,4]
pygui(true)
plot_graph(M, x, y, z; setaxis=false)
Out[15]:
1-element Array{PyCall.PyObject,1}:
 PyObject <mpl_toolkits.mplot3d.art3d.Line3D object at 0x7f8a43a2c518>

Platonic Solids

Examples include Dodecahedron (dodec.txt), Icosahedron (isoca.txt), Octahedron (octa.txt), Cube (cube.txt) and Tetrahedron (tetra.txt)

In [16]:
M = readIJV("icosa.txt")
Out[16]:
12×12 SparseMatrixCSC{Float64,Int64} with 60 stored entries:
  [2 ,  1]  =  1.0
  [5 ,  1]  =  1.0
  [6 ,  1]  =  1.0
  [9 ,  1]  =  1.0
  [10,  1]  =  1.0
  [1 ,  2]  =  1.0
  [7 ,  2]  =  1.0
  [8 ,  2]  =  1.0
  [9 ,  2]  =  1.0
  [10,  2]  =  1.0
  [4 ,  3]  =  1.0
  [5 ,  3]  =  1.0
  ⋮
  [8 , 10]  =  1.0
  [12, 10]  =  1.0
  [3 , 11]  =  1.0
  [4 , 11]  =  1.0
  [5 , 11]  =  1.0
  [7 , 11]  =  1.0
  [9 , 11]  =  1.0
  [3 , 12]  =  1.0
  [4 , 12]  =  1.0
  [6 , 12]  =  1.0
  [8 , 12]  =  1.0
  [10, 12]  =  1.0
In [17]:
E = eigen(Matrix(lap(M)))
println(E.values)
[9.76996e-15, 2.76393, 2.76393, 2.76393, 6.0, 6.0, 6.0, 6.0, 6.0, 7.23607, 7.23607, 7.23607]
In [18]:
x = E.vectors[:,2]
y = E.vectors[:,3]
pygui(false)
plot_graph(M, x, y; setaxis=false)
Out[18]:
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.lines.Line2D object at 0x7f8a416d3208>
In [19]:
z = E.vectors[:,4]
pygui(true)
plot_graph(M, x, y, z; setaxis=false)
Out[19]:
1-element Array{PyCall.PyObject,1}:
 PyObject <mpl_toolkits.mplot3d.art3d.Line3D object at 0x7f8a4173de10>
In [ ]:

In [ ]: