@@ -61,16 +61,11 @@ def interface(
6161) -> go .Figure :
6262 """Plot the interface DAG.
6363
64- Parameters
65- ----------
66- include_fail_and_warn_nodes
67- Whether to include fail and warn nodes.
68- show_node_description
69- Whether to show the node description.
70- output_path
71- If provided, the figure is written to the path.
72- node_colormap
73- Dictionary mapping namespace tuples to colors.
64+ Args:
65+ include_fail_and_warn_nodes: Whether to include fail and warn nodes.
66+ show_node_description: Whether to show the node description.
67+ output_path: If provided, the figure is written to the path.
68+ node_colormap: Dictionary mapping namespace tuples to colors.
7469 - Tuples can represent any level of the namespace hierarchy (e.g.,
7570 ("input_data",) would be the first level,
7671 ("input_data", "df_and_mapper") the second level.
@@ -80,14 +75,14 @@ def interface(
8075 match will be used.
8176 - Fallback color is black.
8277 - Use any color from https://plotly.com/python/css-colors/
83- If None, cycle through colors at the uppermost level of the namespace hierarchy.
84- kwargs
85- Additional keyword arguments. Will be passed to
86- plotly.graph_objects.Figure.layout.
87-
88- Returns
89- -------
90- The figure.
78+ If None, cycle through colors at the uppermost level of the namespace
79+ hierarchy.
80+ kwargs: Additional keyword arguments. Will be passed to
81+ plotly.graph_objects.Figure.layout.
82+
83+ Returns:
84+ The figure.
85+
9186 """
9287 return ttsim .plot .dag .interface (
9388 include_fail_and_warn_nodes = include_fail_and_warn_nodes ,
@@ -125,36 +120,29 @@ def tt(
125120) -> go .Figure :
126121 """Plot the TT DAG.
127122
128- Parameters
129- ----------
130- primary_nodes
131- The primary nodes, specified as tree paths (e.g.,
132- `{("einkommensteuer", "abgeltungssteuer", "betrag_y_sn")}`) or qualified names
133- (e.g., `{"einkommensteuer__abgeltungssteuer__betrag_y_sn"}`). Primary nodes are
134- used to determine which other nodes to include in the plot based on the
135- selection_type. They may be root nodes (for descendants), end nodes (for
136- ancestors), or middle nodes (for neighbors). If not provided, the entire DAG is
137- plotted.
138- selection_type
139- The type of the DAG to plot. Can be one of:
123+ Args:
124+ primary_nodes: The primary nodes, specified as tree paths (e.g.,
125+ `{("einkommensteuer", "abgeltungssteuer", "betrag_y_sn")}`) or qualified
126+ names (e.g., `{"einkommensteuer__abgeltungssteuer__betrag_y_sn"}`).
127+ Primary nodes are used to determine which other nodes to include in the
128+ plot based on the selection_type. They may be root nodes (for descendants),
129+ end nodes (for ancestors), or middle nodes (for neighbors). If not
130+ provided, the entire DAG is plotted.
131+ selection_type: The type of the DAG to plot. Can be one of:
140132 - "neighbors": Plot the neighbors of the primary nodes.
141133 - "descendants": Plot the descendants of the primary nodes.
142134 - "ancestors": Plot the ancestors of the primary nodes.
143135 - "all_paths": All paths between the primary nodes are displayed (including
144136 any other nodes lying on these paths). You must pass at least two primary
145137 nodes.
146- If not provided, the entire DAG is plotted.
147- selection_depth
148- The depth of the selection. Only used if selection_type is "neighbors",
149- "descendants", or "ancestors".
150- include_params
151- Include params and param functions when plotting the DAG. Default is True.
152- show_node_description
153- Show a description of the node when hovering over it.
154- output_path
155- If provided, the figure is written to the path.
156- node_colormap
157- Dictionary mapping namespace tuples to colors.
138+ If not provided, the entire DAG is plotted.
139+ selection_depth: The depth of the selection. Only used if selection_type is
140+ "neighbors", "descendants", or "ancestors".
141+ include_params: Include params and param functions when plotting the DAG.
142+ Default is True.
143+ show_node_description: Show a description of the node when hovering over it.
144+ output_path: If provided, the figure is written to the path.
145+ node_colormap: Dictionary mapping namespace tuples to colors.
158146 - Tuples can represent any level of the namespace hierarchy (e.g.,
159147 ("sozialversicherung",) would be the first level,
160148 ("sozialversicherung", "arbeitslosenversicherung") the second level.
@@ -164,32 +152,23 @@ def tt(
164152 match will be used.
165153 - Fallback color is black.
166154 - Use any color from https://plotly.com/python/css-colors/
167- If None, cycle through colors at the uppermost level of the namespace hierarchy.
168- policy_date_str
169- The date for which to plot the DAG.
170- orig_policy_objects
171- The orig policy objects.
172- input_data
173- The input data.
174- processed_data
175- The processed data.
176- labels
177- The labels.
178- policy_environment
179- The policy environment.
180- backend
181- The backend to use when executing main.
182- include_fail_nodes
183- Whether to include fail nodes when executing main.
184- include_warn_nodes
185- Whether to include warn nodes when executing main.
186- kwargs
187- Additional keyword arguments. Will be passed to
188- plotly.graph_objects.Figure.layout.
189-
190- Returns
191- -------
192- The figure.
155+ If None, cycle through colors at the uppermost level of the namespace
156+ hierarchy.
157+ policy_date_str: The date for which to plot the DAG.
158+ orig_policy_objects: The orig policy objects.
159+ input_data: The input data.
160+ processed_data: The processed data.
161+ labels: The labels.
162+ policy_environment: The policy environment.
163+ backend: The backend to use when executing main.
164+ include_fail_nodes: Whether to include fail nodes when executing main.
165+ include_warn_nodes: Whether to include warn nodes when executing main.
166+ kwargs: Additional keyword arguments. Will be passed to
167+ plotly.graph_objects.Figure.layout.
168+
169+ Returns:
170+ The figure.
171+
193172 """
194173 return ttsim .plot .dag .tt (
195174 root = germany .ROOT_PATH ,
0 commit comments