Did you know ... Search Documentation:
Pack prolog_graphviz -- prolog/gv.pl
PublicShow source
 gv_export(+File:atom, :Goal_1) is det
 gv_export(+File:atom, :Goal_1, +Options:dict) is det
Arguments:
File- is the name of the file to which the graph export is written.
Goal_1- is a unary goal that takes a Prolog output stream that receives DOT formatted messages.
Options- is a dictionary that may include any of the following options:
  • format(+atom) The format that is used to store the output in. Both binary and text output formats are supported. See gv_format_type(-Format, Type), memberchk(Type, [binary,text]) for possible values. The default value is based on the file extension of File, if this can be heuristically mapped to a GraphViz format, or else uses the value of setting default_gv_export_format.
  • method(+atom) The method that is used by GraphViz to calculate the graph layout. See gv_method(-Method) for possible values. The default value is stored in setting default_gv_method.
  • Other options are passed to dot_graph/4.
 gv_view(:Goal_1) is det
 gv_view(:Goal_1, +Options:dict) is det
Generate a GraphViz graph visualization and open the result in a viewer application.
Arguments:
Goal_1- is a unary goal that takes a Prolog output stream that receives DOT formatted messages.
Options- is a dictionary that may include any of the options defined for gv_export/3, but option `format' is set to the value of setting `default_gv_view_format'.
 gv_format(+Format:atom) is semidet
gv_format(-Format:atom) is nondet
 gv_format_media_type(+Format:atom, +MediaType:compound) is semidet
gv_format_media_type(+Format:atom, -MediaType:compound) is semidet
gv_format_media_type(-Format:atom, +MediaType:compound) is semidet
gv_format_media_type(-Format:atom, -MediaType:compound) is multi
 gv_format_type(+Format:atom, +Type:gv_type) is semidet
gv_format_type(+Format:atom, -Type:gv_type) is det
gv_format_type(-Format:atom, +Type:gv_type) is multi
gv_format_type(-Format:atom, -Type:gv_type) is nondet
 gv_method(?Method:atom) is nondet
Layout methods supported by GraphViz.

Re-exported predicates

The following predicates are re-exported from other modules

 dot_arc(+Out:stream, +FromTerm:term, +ToTerm:term) is det
 dot_arc(+Out:stream, +FromTerm:term, +ToTerm:term, +Options:dict) is det
Emits an arc (directed edge) from one Prolog term to another in the DOT language.

Since Prolog terms cannot be used as DOT IDs, dot_arc/[3,4] and automatically creates compatible DOT IDs under the hood. The same Prolog term is always denoted by the same DOT ID.

See also
- Most of the time, the use of Prolog terms instead of DOT IDs is preferable. However, there are legitimate use cases where the programmer would like to generate and use the DOT IDs herself. For these purposes, dot_arc_id/[3,4] can be used -- in combination with dot_id/2 -- instead.
 dot_arc(+Out:stream, +FromTerm:term, +ToTerm:term) is det
 dot_arc(+Out:stream, +FromTerm:term, +ToTerm:term, +Options:dict) is det
Emits an arc (directed edge) from one Prolog term to another in the DOT language.

Since Prolog terms cannot be used as DOT IDs, dot_arc/[3,4] and automatically creates compatible DOT IDs under the hood. The same Prolog term is always denoted by the same DOT ID.

See also
- Most of the time, the use of Prolog terms instead of DOT IDs is preferable. However, there are legitimate use cases where the programmer would like to generate and use the DOT IDs herself. For these purposes, dot_arc_id/[3,4] can be used -- in combination with dot_id/2 -- instead.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 gv_export(Arg1, Arg2, Arg3)
 gv_view(Arg1, Arg2)
 dot_arc_id(Arg1, Arg2, Arg3)
 dot_arc_id(Arg1, Arg2, Arg3, Arg4)
 dot_cluster(Arg1, Arg2, Arg3)
 dot_cluster(Arg1, Arg2, Arg3, Arg4)
 dot_cluster_arc(Arg1, Arg2, Arg3)
 dot_cluster_arc(Arg1, Arg2, Arg3, Arg4)
 dot_cluster_arc_id(Arg1, Arg2, Arg3)
 dot_cluster_arc_id(Arg1, Arg2, Arg3, Arg4)
 dot_cluster_id(Arg1, Arg2, Arg3)
 dot_cluster_id(Arg1, Arg2, Arg3, Arg4)
 dot_edge(Arg1, Arg2, Arg3)
 dot_edge(Arg1, Arg2, Arg3, Arg4)
 dot_edge_id(Arg1, Arg2, Arg3)
 dot_edge_id(Arg1, Arg2, Arg3, Arg4)
 dot_graph(Arg1, Arg2)
 dot_graph(Arg1, Arg2, Arg3)
 dot_html_replace(Arg1, Arg2)
 dot_id(Arg1)
 dot_id(Arg1, Arg2)
 dot_node(Arg1, Arg2)
 dot_node(Arg1, Arg2, Arg3)
 dot_node_id(Arg1, Arg2)
 dot_node_id(Arg1, Arg2, Arg3)