experimental.plotter.matplotlib_plotter module
Define a plotter that rely on the matplotlib library.
- class MatplotlibPlotter(elts: ListOfElements | None = None)
Bases:
IPlotter
A plotter that takes in numpy arrays.
- __init__(elts: ListOfElements | None = None) None
Instantiate some common attributes.
- _abc_impl = <_abc._abc_data object>
- _actual_constant_plot(axes: Axes | Sequence[Axes], constant: float, color: str, ls: str, **kwargs) None
Add one constant plot.
- _actual_plot(data: DataFrame, ylabel: str, axes: Sequence[Axes], axes_index: int, xlabel: str = 'Synch. position [m]', **plot_kwargs: Any) Sequence[Axes]
Create the plot itself.
- _plot_sections(axes: Any, elts: ListOfElements, x_axis: str) None
Add the sections on the structure plot.
- _plot_structure(axes: Sequence[Axes], elts: ListOfElements | None = None, x_axis: str = 'z_abs') None
Add a plot to show the structure of the linac.
- _setup_fig(fignum: int, title: str, **kwargs) list[Axes]
Setup the figure and axes.
- save_figure(axes: Axes | Sequence[Axes], save_path: Path) None
Save the created figure.