How to change color in networkx graph plotted with holoviews/bokeh?
问题 How can I change the color of individual nodes in the following example? %pylab inline import pandas as pd import networkx as nx import holoviews as hv hv.extension('bokeh') G = nx.Graph() ndxs = [1,2,3,4] G.add_nodes_from(ndxs) G.add_weighted_edges_from([(1,2,0), (1,3,1), (1,4,-1), (2,4,1), (2,3,-1), (3,4,10)]) hv.extension('bokeh') %opts Graph [width=400 height=400] padding = dict(x=(-1.1, 1.1), y=(-1.1, 1.1)) hv.Graph.from_networkx(G, nx.layout.spring_layout).redim.range(**padding) 回答1: