Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I keep losing my node labels on graph export

Hello! I often export Sage graphs by using networkx. This is a typical example:

import networkx
g = graphs.HerschelGraph()
h = g.networkx_graph()
networkx.write_graphml(h,'HerschelGraph.graphml')

However, when I open the graphml-file in the YEd Graph Editor (which is my favorite software for displaying graphs) I find that the node labels (that are clearly existent in the Sage version of the graph) have disappeared forever. Everything else works fine. Assuming that this is Sage's fault rather than the graph editor's fault: What can I do to export the node labels as well?

Thank you very much for your help.

Malte

click to hide/show revision 2
retagged

I keep losing my node labels on graph export

Hello! I often export Sage graphs by using networkx. This is a typical example:

import networkx
g = graphs.HerschelGraph()
h = g.networkx_graph()
networkx.write_graphml(h,'HerschelGraph.graphml')

However, when I open the graphml-file in the YEd Graph Editor (which is my favorite software for displaying graphs) I find that the node labels (that are clearly existent in the Sage version of the graph) have disappeared forever. Everything else works fine. Assuming that this is Sage's fault rather than the graph editor's fault: What can I do to export the node labels as well?

Thank you very much for your help.

Malte