The :py:class:`~dantro.plot_mngr.PlotManager` ============================================= The :py:class:`~dantro.plot_mngr.PlotManager` orchestrates the whole plotting framework. This document describes what it is and how it works together with the :doc:`plot_creators` to generate plots. .. contents:: :local: :depth: 2 ---- Overview -------- The :py:class:`~dantro.plot_mngr.PlotManager` manages the creation of plots. So far, so obvious. The idea of the :py:class:`~dantro.plot_mngr.PlotManager` is that it is aware of all available data and then gets instructed to create a set of plots from this data. The :py:class`~dantro.plot_mngr.PlotManager` does not actually carry out any plots. Its purpose is to handle the configuration of some :doc:`plot creator `, the signature of the plot functions is averse to the choice of a creator. This makes it possible to implement *generic* plotting functions, which can be used for all :py:class:`~dantro.plot_creators.pcr_ext.ExternalPlotCreator`\ -derived plot creators. In such cases, simply omit the ``creator_*`` argument to the decorator and specify the creator via the plot configuration. .. note:: Setting only the ``creator_name`` is recommended for scenarios where the import of the creator type is not desired. In other scenarios, it's best to use ``creator_type`` .. deprecated:: 0.10 If no plot function attributes are given, there is still another way to auto-detect the desired plot creator: inspecting the plot function signature. This works, because derived creators *might* require a different plot function signature. For example, :py:class:`~dantro.plot_creators.pcr_psp.MultiversePlotCreator`) additionally passes ``mv_data`` as keyword-only argument. However, this approach can lead to ambiguous results and thus failing auto-detection. For those cases, it makes sense to specify plot function attributes via the decorator. Due to the ambiguity and the many different ways in which a plot function can be defined, this feature will be removed in v0.11.