rail.plotting.plot_holder module
- class rail.plotting.plot_holder.RailPlotDict(name, plots)[source]
Bases:
objectSimple class for dicts of matplotlib Figures
This collects a set of plots made on the same dataset. The key is typically the name of the RailPlotter used to make each plot.
- Parameters:
name (str)
plots (dict[str, RailPlotHolder])
- property name: str
Return the name of the plot dict
- property plots: dict[str, RailPlotHolder] | None
Return the dict of plots
- class rail.plotting.plot_holder.RailPlotHolder(name, path=None, figure=None, plotter=None, dataset_holder=None)[source]
Bases:
objectSimple class for wrapping matplotlib Figure
This includes the path to where the figure is saved
- Parameters:
name (str)
path (str | None)
figure (Figure | None)
plotter (RailPlotter | None)
dataset_holder (RailDatasetHolder | None)
- property dataset_holder: RailDatasetHolder | None
Return the dataset used to make the plot
- property figure: Figure | None
Return the matplotlib Figure
- property name: str
Return the name of the plot
- property path: str | None
Return the path to the saved plot
- property plotter: RailPlotter | None
Return the object used to make the plot
- savefig(relpath, outdir='.', **kwargs)[source]
- Return type:
None- Parameters:
relpath (str)
outdir (str)
kwargs (Any)