grapa.plot.export.GraphExporter

class grapa.plot.export.GraphExporter

Bases: object

A library of functions useful to export Graphs into a txt file. Packed into a unique class for encapsulation purpose.

__init__()

Methods

export_as_text(graph[, filesave, ...])

Exports content of Graph object into a human- and machine-readable format.

export_as_xml(graph[, filesave])

Exports Graph as .xml file.

writefile(filename, text)

Writes text to a file.

classmethod export_as_text(graph: Graph, filesave: str = '', save_altered=False, if_template=False, if_compact=True, if_only_labels=False, if_clipboard_export=False) str

Exports content of Graph object into a human- and machine-readable format.

static export_as_xml(graph: Graph, filesave: str = '', **kwargs) str

Exports Graph as .xml file. Not quite mature nor useful (no clear advantage over default format)

Parameters:
  • graph – a Graph object

  • filesave

  • kwargs – empty.

Returns:

name of the saved file

static writefile(filename, text)

Writes text to a file.