Plot Creators

Within the plotting framework, the plot creators are the classes that perform all the actual plotting work. This document describes what they are and how they can be used.

For further reading on the individual plot creators, see:

For specializing plot creators, see here.

A Family of Plot Creators

AbstractPlotCreator - The plot creator interface

As defined in, the AbstractPlotCreator defines the interface for plot creators, i.e.: all the methods the PlotManager expects and requires to create a plot.

By implementing the abstract methods, the behavior of the plot creators can be specified.

Part of the interface is that a plot creator will be initialized with the knowledge about a DataManager, that holds the data that should be used for plotting.

BasePlotCreator - Implementing some default behaviour

The BasePlotCreator implements some of the abstract functions to make deriving new plot creators easier.

ExternalPlotCreator - Creating plots from imported python modules

The ExternalPlotCreator focusses on creating plots from a python plot function:

  • The plot creator requires a so-called plot function that is executed to generate the plot. That plot function can be imported in various ways:

    • The included ext_funcs subpackage supplies some plot functions

    • An already importable module, i.e. one that is installed or can be found in sys.path

    • A plot function loaded from an external module file

  • All remaining arguments of the plot configuration are passed on to the plot function

  • The plot function can do whatever it wants, also meaning that it has to do everything by itself (getting data, saving plots, closing figures …)

The plot function gets passed some data or the DataManager (to manually select data) and the rest of the plot configuration. The required signature of the plot function depends on the chosen additional features of the ExternalPlotCreator, e.g., the PlotHelper or Plot Data Selection.

For more information, have a look at the dedicated documentation page.

UniversePlotCreator & MultiversePlotCreator

Implemented in dantro.plot_creators.pcr_psp are plot creators that work tightly with data stored in a ParamSpaceGroup, i.e.: data that was created from a parameter sweep. These are derived from ExternalPlotCreator and inherit all its abilities.

There are two different plot creators to work with this kind of data. The UniversePlotCreator allows selecting a certain subspace of the parameter space and creating a plot for each of these so-called “universes”.

The MultiversePlotCreator on the other hand uses the capabilities of the ParamSpaceGroup to select and combine data from many universes, thus working on the “multiverse”. For the syntax needed to select the field and the subspace from the data, refer to

For more information, see Plots from Multidimensional Data.