how to reshape a networkx graph in python?,plt.show()