:py:mod:`raesl.plot` ==================== .. py:module:: raesl.plot .. autoapi-nested-parse:: RaESL plotting and visualization module. Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 diagrams/index.rst generic/index.rst matrix/index.rst utils/index.rst view_funcs/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: raesl.plot.Style Functions ~~~~~~~~~ .. autoapisummary:: raesl.plot.function_chain_diagram raesl.plot.function_traceability_diagram raesl.plot.functional_context_diagram raesl.plot.functional_dependency_diagram raesl.plot.hierarchy_diagram raesl.plot.mdm .. py:function:: function_chain_diagram(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()) -> graphviz.Digraph Draw a function chain diagram using Graphviz. :param graph: Instantiated ESL graph. :param start_points: List of tuples that contain the component node and list of function nodes that serve as the starting point of the function chains. :param end_points: List of tuples that contain the component node and list of function nodes that serve as the end point of the function chains. :param levels: Number of levels to decompose intermediate components into. This number is relative to the depth of the start nodes and end nodes. :param style: RaESL style options. :returns: Graphviz Digraph object of the function chain diagram. .. py:function:: function_traceability_diagram(graph: ragraph.graph.Graph, root: ragraph.node.Node, levels: int, style: raesl.plot.generic.Style = Style()) -> graphviz.Digraph Draw a functional traceability diagram using Graphviz. :param graph: Instantiated ESL graph. :param root: Node that serves a the root of the traceability tree. Must be a transformation specification. :param levels: Number of levels to go down into the traceability tree. :param style: RaESL Style options. Returns Graphviz Digraph object of the functional traceability diagram. .. py:function:: functional_context_diagram(graph: ragraph.graph.Graph, root: ragraph.node.Node, degree: int = 1, style: raesl.plot.generic.Style = Style()) -> graphviz.Digraph Draw a functional context diagram using Graphviz. :param graph: Instantiated ESL graph. :param root: Root node for which the functional context is drawn. :param degree: The degree up to which neighbors must be collected (neighbors of neighbors). Defaults to 1. :param style: RaESL style options. :returns: Graphviz Digraph object of the functional context diagram. .. py:function:: functional_dependency_diagram(graph: ragraph.graph.Graph, root: ragraph.node.Node, levels: int, style: raesl.plot.generic.Style = Style()) -> graphviz.Digraph Draw a functional dependency diagram using Graphviz. :param graph: Instantiated ESL graph. :param root: Root node for which the dependency structure must be drawn. :param levels: Number of levels to include in the tree. :param style: RaESL style options. :returns: Graphviz Digraph object of the functional dependency diagram. .. py:function:: hierarchy_diagram(graph: ragraph.graph.Graph, roots: List[ragraph.node.Node], levels: int, style: raesl.plot.generic.Style = Style()) -> graphviz.Digraph Draw a hierarchical decomposition tree using Graphviz. :param graph: Instantiated ESL graph. :param roots: List of root nodes for which a tree must be drawn. :param levels: Number of levels to include in the tree. :param style: RaESL style options. :returns: Graphviz Digraph object of the decomposition tree. .. py:class:: Style(diagram: Optional[Union[DiagramStyle, Dict[str, Any]]] = None, ragraph: Optional[Union[ragraph.plot.generic.Style, Dict[str, Any]]] = None) Bases: :py:obj:`ragraph.generic.Mapping` RaESL plotting style mapping. .. py:attribute:: _defaults .. py:method:: diagram() -> DiagramStyle Graphviz diagram style. .. py:method:: ragraph() -> ragraph.plot.generic.Style RaGraph style options, used for Multi-Domain matrices. .. py:function:: mdm(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: Optional[int] = 2, style: raesl.plot.generic.Style = Style()) -> plotly.graph_objs.Figure Create a Multi-Domain Matrix plot using Plotly. :param node_kinds: The node kinds to display. :param edge_kinds: The edge kinds to display. :param edge_labels: The edge labels to display. :param edge_weights: The edge weights to display. :param lead_components: The lead components to be used in node selection. :param depth: The depth up to which components and related nodes must be included. :param style: RaESL style options. :returns: Plotly :obj:`go.Figure` object of the Multi-Domain Matrix.