lir.aggregation.plot_each module
- class lir.aggregation.plot_each.PlotEach(plot_fn: Callable, plot_name: str, output_path: Path | None = None, **kwargs: Any)[source]
Bases:
AggregationAggregation that generates a plot for each call to
report().Repeated calls to
report()will result in separate plots.- Parameters:
plot_fn (Callable) – The plotting function to be used for generating plots.
plot_name (str) – The name of the plot.
output_path (Path | None, optional) – The directory where the plots will be saved. If None, plots are not saved.
**kwargs (Any) – Additional arguments to be passed to the plotting function.
- output_path
The directory where the plots will be saved. If None, plots are not saved.
- Type:
Path | None
- plot_fn
The plotting function to be used for generating plots.
- Type:
Callable
- report(data: AggregationData) None[source]
Plot the data when new results are available.
- Parameters:
data (AggregationData) – The aggregated data to be plotted.
- class lir.aggregation.plot_each.PlotEachConfigParser(method: str, default_plot_name: str | None = None)[source]
Bases:
ConfigParserConfiguration parser for aggregate plots.
- Parameters:
- parse(config: ContextAwareDict, output_dir: Path) PlotEach[source]
Parse a configuration section for an aggregate plot.
- Parameters:
config (ContextAwareDict) – Configuration section.
output_dir (Path) – Output directory.
- Returns:
Parsed aggregate plot.
- Return type: