:py:mod:`raesl.plot.view_funcs` =============================== .. py:module:: raesl.plot.view_funcs .. autoapi-nested-parse:: GraphView view functions for ESL. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: raesl.plot.view_funcs.multi_domain raesl.plot.view_funcs.hierarchy raesl.plot.view_funcs.functional_dependency raesl.plot.view_funcs.traceability raesl.plot.view_funcs.function_chain raesl.plot.view_funcs.functional_context raesl.plot.view_funcs._add_component_goal_edges .. py:function:: multi_domain(graph: ragraph.graph.Graph, node_kinds: Optional[List[str]] = None, edge_kinds: Optional[List[str]] = None, edge_labels: Optional[List[str]] = None, edge_weights: Optional[List[str]] = None, lead_components: Optional[List[ragraph.node.Node]] = None, depth: int = 2) -> Tuple[List[ragraph.node.Node], List[ragraph.edge.Edge]] Create multi-domain-matrix visualization based on an ESL derived graph. :param graph: Input graph object derived from an ESL specification. :param node_kinds: The node kinds that are included in the plot. Defaults to all node_kinds present within the graph. :param edge_kinds: The edge kinds that are included in the plot. Defaults to all edge_kinds present within the graph. :param edge_labels: The edge labels that are shown in the plot. Defaults to all edge_labels present within the graph. :param edge_weights: The edge weight types that are shown in the plot. Defaults to a single random edge weight present within the graph. :param lead_components: The lead components to be used to select other nodes. :param depth: Depth up to which lead components must be selected if no lead components are provided. :returns: Node list and Edge list. .. py:function:: hierarchy(graph: ragraph.graph.Graph, roots: List[ragraph.node.Node], levels: int) -> Tuple[List[ragraph.node.Node], List[ragraph.edge.Edge]] Filter nodes and create edges for drawing a hierarchical decomposition diagram. :param graph: Source data graph. :param roots: Roots of the hierarchical diagram. :param levels: Number of levels to include in the diagram. :returns: List of selected nodes and list of created edges. .. py:function:: functional_dependency(graph: ragraph.graph.Graph, root: ragraph.node.Node, levels: int) -> Tuple[List[ragraph.node.Node], List[ragraph.node.Node]] Filter method for drawing a nested functional dependency structure. Arguments graph: Instantiated ESL graph. root: Root node for which the dependency structure must be drawn. levels: Number of levels to include in the tree. :returns: List of nodes and edges to be displayed. .. note:: This method assumes that the data source graph is generated from an ESL specification. .. py:function:: traceability(graph: ragraph.graph.Graph, root: ragraph.node.Node, levels: int, style: raesl.plot.generic.Style = Style()) -> Tuple[List[ragraph.node.Node], List[ragraph.edge.Edge]] Filter nodes and edges for drawing a traceability diagram. :param graph: Instantiated ESL graph. :param root: The root transformation specification. :param levels: Number of levels to include in the traceability diagram. :param style: RaESL style options. :returns: List of selected nodes and list of selected edges. .. py:function:: function_chain(graph: ragraph.graph.Graph, start_points: List[Tuple[ragraph.node.Node, List[ragraph.node.Node]]], end_points: List[Tuple[ragraph.node.Node, List[ragraph.node.Node]]], levels: int = 1, style: raesl.plot.generic.Style = Style()) -> Tuple[List[ragraph.node.Node], List[ragraph.edge.Edge]] Filter nodes and edges for a function chain diagram. :param graph: Instantiated ESL graph. :param start_points: List of start-points for the function chains. :param end_points: List of end-points for the function chains. :param levels: Number of levels to decompose intermediate components into (if present). :param style: style options class. :returns: List of selected nodes and list of selected edges. .. py:function:: functional_context(graph: ragraph.graph.Graph, root: ragraph.node.Node, degree: int, style: raesl.plot.generic.Style = Style()) -> Tuple[List[ragraph.node.Node], List[ragraph.edge.Edge]] Filter nodes and edges for drawing a functional context diagram. :param graph: Instantiated ESL graph. :param root: The root node for which the functional context diagram must be drawn. :param degree: Degree up to which neighbors of neighbors must be sought. :param style: RaESL style options. :returns: List of selected nodes and list of selected edges. .. py:function:: _add_component_goal_edges(graph: ragraph.graph.Graph, tree: List[ragraph.node.Node], functions: List[ragraph.node.Node]) -> List[ragraph.edge.Edge] Create edges between component or cluster nodes if a goal cannot be related to a transformation: :param graph: Instantiated ESL graph. :param tree: List of components that are within the (sub)tree that is plotted. :param functions: List of function specs that is plotted. :returns: List of edges.