Name

save_graph — saves a graph in a file

Calling Sequence

save_graph(g,path)

Parameters

g

a graph_data_structure.

path

string, the path of the graph to save

Description

save_graph saves the graph g in a graph file. path is the name of the graph file where the graph will be saved. path can be the name or the pathname of the file; if the "graph" extension is missing in path, it is assumed. If path is the name of a directory, the name of the graph is used as the name of the file.

Standard save function may also be used to save a graph in a file. In this case take care to save only a single graph data structure in the file (without any other variable) if you want to reload this file with load_graph or edit_graph.

Examples


g=load_graph(metanet_module_path()+'/demos/mesh100.graph');
show_graph(g);
save_graph(g,'mymesh100.graph');
g=load_graph('mymesh100.graph');
show_graph(g,'new');
 
  

See Also

load_graph , edit_graph , graph_data_structure , save , load