[ library(graphviz) | Reference Manual | Alphabetic Index ]
write_graph(+Graph, +File, +Format)
Write a picture of a graph as a file of a given format
- Graph
- A graph structure
- File
- A file name
- Format
- An atom (ps,dot,png,gif,...)
Modules
This predicate is sensitive to its module context (tool predicate, see @/2).
Examples
    ?- lib(graph_algorithms), lib(graphviz).
    Yes (1.17s cpu)
    ?- make_random_graph(10,30,true,true,true,G),
       write_graph(G, "mygraph", png).
    G = graph(...)
    Yes (0.03s cpu)
    ?- make_random_graph(10,30,true,true,true,G),
       write_graph(G, "mygraph", dot).
    G = graph(...)
    Yes (0.03s cpu)
    
See Also
write_graph / 2, write_graph / 4, view_graph / 2, library(graph_algorithms)