【发布时间】:2014-07-27 04:54:51
【问题描述】:
这会显示一个节点,它是一个使用networkx 和matplotlib 的图形:
import networkx as nx
import matplotlib.pyplot as plt
G = nx.Graph()
n = "%%%%% \n% % % \n%%%%%"
print n
G.add_node(n)
nx.draw(G)
plt.show()
print n 显示:
%%%%%
% % %
%%%%%
plt.show() 显示:
%%%%%
%%%
%%%%%
数据非常大,所以我无法编辑 n 并重新排列它以获得所需的输出。 如何编码以使两个形状相等?
【问题讨论】:
标签: python python-2.7 matplotlib networkx