finesse.plotting.graph.plot_dcfields_graph
- finesse.plotting.graph.plot_dcfields_graph(model: Model, path: Path | str | None = None, show: bool = True, add_fields: bool = True, add_operators: bool = False) Path [source]
Visualize the values of the DC fields in a model in a graph representation. Will run a
finesse.analysis.actions.dc.DCFields
action under the hood.- Parameters:
- modelfinesse.Model
Model to visualize
- pathPath | str | None, optional
Save the resulting image to the given path. Defaults to None, which saves in a temporary file that is displayed if ‘show’ is set to True.
- showbool, optional
Whether to show the resulting image. In Jupyter environments, shows the plot inline, otherwise opens a webbrowser. Defaults to True.
- add_fieldsbool, optional
Whether to show the DC fields values in the nodes of the graph, by default True
- add_operatorsbool, optional
Whether to show the couplings between nodes as edge tooltips, by default False. Only supported for plane-wave single frequency models for now.
- Returns:
- pathlib.Path
Path where the svg was saved
- Raises:
- ModuleNotFoundError
If pygraphviz is not installed
- NotImplementedError
When
add_operators
is True, but the model is not plane-wave single frequency