import tensorflow as tf
import numpy as np
from pygsp import graphs, filters
G = graphs.Logo()
G.estimate_lmax()
g = filters.Heat(G, tau=100)
DELTAS = [20, 30, 1090]
s = np.zeros(G.N)
s[DELTAS] = 1
s = g.filter(s)
G.plot_signal(s, highlight=DELTAS, backend='matplotlib')
上面这段代码,执行后图象显示不出来,增加两行代码,问题解决,代码如下:
import tensorflow as tf
import numpy as np
from pygsp import graphs, filters
from pygsp import plotting
G = graphs.Logo()
G.estimate_lmax()
g = filters.Heat(G, tau=100)
DELTAS = [20, 30, 1090]
s = np.zeros(G.N)
s[DELTAS] = 1
s = g.filter(s)
G.plot_signal(s, highlight=DELTAS, backend='matplotlib')
plotting.show()