
viz(+Handle, ?ToolSpecs)

   Run the CP-Viz viz program to convert xml traces to graphics

Arguments
   Handle              A (just closed) visualisation handle
   ToolSpecs           Configuration options for the output to produce

Type
   library(cpviz)

Description

    This predicate provides a convenient interface to CP-Viz's 'viz' program,
    which converts XML trace log files into various drawing formats.  It is
    meant to be invoked just after the trace files have been produced.
    Afterwards, the resulting output may be viewed using viztool.

    The Handle argument should be the handle of a finished tracing session,
    which must have been closed already via close_visualization/1.

    The 'viz' program needs a configuration.xml file with options.  If such
    a file is present in the directory where the trace log files are located,
    and you want to use it, then set ToolSpecs to [].
    Otherwise, a configuration file will be created from the ToolSpecs.
    ToolSpecs is a list of tool-structures with the following arguments
    (all arguments except 'show' are optional):

    show
        tree or viz

    type
        layout (default), distribution, treemap, graph, values

    display
        compact (default) or expanded.  This controls whether failed
	subtrees are displayed in compact form.

    repeat
        all, final, or a positive or negative integer

    width
        positive integer (width of SVG canvas in pixels, default 700)

    height
        positive integer (height of SVG canvas in pixels, default 700)


    Alternatively, ToolSpecs can remain completely uninstantiated,
    in which case it defaults to the following two-element list:

        [tool{show:tree},tool{show:viz}]

    For the meaning of the options refer to the CP-Viz documentation.

    After processing the log files with viz/2, you can start viztool/0 and
    view the results, which are located in the directory specified by Handle
    (default 'OUTPUT'). Open the aaa.idx file.


Modes and Determinism
   viz(+, ?) is det

Examples
   
    % for using default configuration settings:
    ...
    close_visualization(Handle),
    viz(Handle, _).

    % with specific configuration settings:
    ...
    close_visualization(Handle),
    viz(Handle, [
            tool{show:tree,display:expanded},
            tool{show:viz,width:1000,height:1000}
        ]).


See Also
   visualization : create_visualization / 2, visualization : close_visualization / 1, viztool / 0
