def displayMatplot(): # display in matplotlib pos=nx.get_node_attributes(g,'pos') nx.draw(g,pos) plt.show() # plt.savefig("/tmp/path.png")