pystra.ddo.plot_summary#
- plot_summary(data, design, quantities=None, labels=None, yscales=None, reference_designs=None, target_failure_probability=None, target_label='LQI target', invert_yaxis=None, panel_labels=False, axes=None, figsize=None, line_kwargs=None)[source]#
Plot a one-dimensional design decision optimization summary.
The helper is intentionally generic: it expects a dataframe-like object with a design column and one or more result columns. It is suitable for continuous one-dimensional design sweeps. More complex discrete alternatives or scenario studies can still use the same risk quantities, but usually need a problem-specific visualization.
- Parameters:
data (
Any) – Table containing the design values and result quantities to plot.design (
str) – Name of the design-variable column.quantities (
Optional[Sequence[str]]) – Result columns to plot. When omitted, common decision columns such aspf,annualized_safety_cost,lqi_margin, andobjectiveare used when present.labels (
Optional[Mapping[str,str]]) – Axis label overrides keyed by column name. The design column may also be included to set the shared x-axis label.yscales (
Optional[Mapping[str,str]]) – Matplotlib y-scale overrides keyed by quantity column name. Failure probability columns use"log"by default.reference_designs (
Optional[Any]) – Designs to mark with vertical lines and point markers. Each item may be a scalar design value or a mapping withdesign,label,color, andmarkerkeys. A mapping without adesignkey is interpreted as{label: design}.target_failure_probability (
Optional[float]) – Drawn as a horizontal line on failure-probability panels.target_label (
str) – Legend label fortarget_failure_probability.invert_yaxis (
Optional[Iterable[str]]) – Quantity columns whose y-axis should be inverted.panel_labels (
bool) – IfTrue, label panelsA),B), …axes (
Optional[Sequence[Any]]) – Existing matplotlib axes. Its length must match the number of quantities.figsize (
Optional[tuple[float,float]]) – Figure size used whenaxesis not supplied.line_kwargs (
Optional[Mapping[str,Any]]) – Keyword arguments passed to the main line plots.
- Returns:
(fig, axes)from matplotlib.- Return type:
tuple