Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何删除networkx中节点的轮廓_Python_Networkx - Fatal编程技术网

Python 如何删除networkx中节点的轮廓

Python 如何删除networkx中节点的轮廓,python,networkx,Python,Networkx,我正在使用python中的networkx为emojis绘制一个网络。这是我的密码: G = nx.Graph() # emoji_sim is a nested list contains cosine similarity of each emojis pair. G = nx.from_numpy_matrix(np.array(emoji_sim)) labels=dict(zip(range(len(G.nodes())),emoji_dict.values())) nx.draw

我正在使用python中的networkx为emojis绘制一个网络。这是我的密码:

G = nx.Graph()
# emoji_sim is a nested list contains cosine similarity of each emojis pair.
G = nx.from_numpy_matrix(np.array(emoji_sim))

labels=dict(zip(range(len(G.nodes())),emoji_dict.values()))

nx.draw(G, edge_color='white', node_color='none', with_labels=True, labels=labels)
plt.show()

我的问题是,是否仍然需要删除节点的轮廓?非常感谢

添加
node\u shape
属性,该属性的指定方式类似于matplotlib标记(请参见)

您只需为属性指定
None

nx.draw(G, edge_color='white', node_color='none', with_labels=True, labels=labels, node_shape=None)

谢谢你的快速回复!如何使用
nx.draw\u networkx\u nodes
命令而不是
nx.draw
为边节点使用某种颜色?