baybe.utils.plotting.create_example_plots

baybe.utils.plotting.create_example_plots(ax: Axes | Axes3D, base_name: str, path: Path = PosixPath('.'))[source]

Create plots from an Axes object and save them as a svg file.

If the SMOKE_TEST variable is set, no plots are being created and this method immediately returns.

The function attempts to read the predefined themes from plotting_themes.json. For each theme it finds, a file {base_name}_{theme}.svg is being created. If the file cannot be found, if the JSON cannot be loaded or if the JSON is not well configured, a fallback theme is used.

Parameters:
  • ax (Axes | Axes3D) – The Axes object containing the figure that should be plotted.

  • base_name (str) – The base name that is used for naming the output files.

  • path (Path) – Optional path to the directory in which the plots should be saved.

Return type:

None

Returns:

The Figure containing ax