Given a dataset X and an weight matrix W a networkx graph G is given by
G = nx.Graph(W.todense()) pos = {i: list(p) for i, p in enumerate(X)} nx.set_node_attributes(G, pos, 'pos') The graph G has the following structure: 
Can we store the graph G with the attributes weight and node position in such way to load G in Gephi and visualize the graph using these attributes?
Thank you in advance.