After transmitting a graph by using this command, the layout algorithm for edge crossing minimization will not be started automatically. You can either do this later using command menu(layout(improve_all)) or by combining both steps with command graph(new_placed(...)), see below. The advantage of the second method is that the user will not see an unplaced graph without an applied crossing minimization.
If you do not like to send the whole graph via API, you can
save it to a file and use command
menu(file(open_graph(...)))
instead for loading the graph from file.
graph(new_placed(graphterm))
This command combines
graph(new(...))
(i.e. transmitting a graph)
and menu(layout(improve_all))
(i.e. starting the layout algorithm to minimize edge crossings) in one step.
The advantage of using this command (instead of the previous one) is that the
user will not see an unplaced graph without an applied crossing minimization.
The parameter graphterm is the
term representation
of the graph which should be visualized.
If you do not like to send the whole graph via API, you can
save it to a file and use command
menu(file(open_graph_placed(...)))
instead for loading the graph from file.
For the list of node_updates, there are two different kinds of
list elements which can be mixed in arbitrary order:
The parameter of the command is a list of attribute changes with two
different kinds of list elements. Both types of elements can be mixed
in arbitrary order:
graph(update(node_updates,edge_updates))
This command can be used to update the structure of a current graph. You can
remove existing nodes and edges, add new nodes or connect nodes with new edges.
A graph update consist of two lists: One for the node and one for the edge
updates.
At the moment, a complete new layout for the whole graph will be calculated
after an update. In the next release daVinci V2.1,
the dynamic layout engine will be able to integrate an update into an existing
layout to ensure visual stability.
For the list of edge_updates, there are three different kinds of
list elements which can be mixed in arbitrary order:
Delete the node with given node_id. The ID must exist in the
current graph. All edges of this node, from the parents and to the childs,
are implicitly removed as well.
Insert a new node in the graph with given node_id,
type and
node attributes. The node ID must be unique
for the set of nodes in the current graph and update. If the
new node is not connected with new edges in the same update (see below),
it will be visualized as an unconnected root node.
Delete the edge with given edge_id. The ID must exist in the current
graph. Note: The edges from the parents and to the childs of a node
removed in the same update must not be deleted, because they are removed
implicitly.
Insert a new edge in the graph with given edge_id,
type and
edge attributes. The edge ID must be unique
for the set of edges in the current graph and update. The first
node_id is the parent and the second node_id is the child
of the edge. Both, the child and parent, have to be ID's of existing nodes in
the current graph or new nodes of the update. Note: You cannot delete
the specified parent and child node in the same update.
Same as new_edge (read directly above), but this will enter the new edge
behind a left neighbour edge which is specified by the additional first
edge_id.
So, the new edge will be the right neighbour of the edges specified by the
first edge_id. The left neighbour edge has to be the ID of an
existing edge in the current graph or a new edge of the update.
At the moment, there is no need to insert an edge at a specific position,
because the order of child nodes is currently not significant. This may
change in a future version of daVinci when visualization definitions
will be available.
graph(change_attr(attr_changes))
This command can be used to update the attributes of nodes and edges that are
already present in the current graph. The semantic of this operation is
either to complete or overwrite the existing attributes of a particular node
or edge. For example, in the current graph, a node is specified to be drawn
in red with text "test", i.e. attributes are:
Complete or overwrite the attributes for the node specified by
node_id which has to be the ID of an existing node in the current
graph.
Complete or overwrite the attributes for the edge specified by
edge_id which has to be the ID of an existing edge in the current
graph.
daVinci V2.0 Online Documentation - Page update: May 21, 1996