Resolve "Add DAG-based generic plot functions using xarray faceting to automatically represent high-dimensional data"
What does this MR do?
This MR implements a generic facet_grid plot compatible with the DAG capabilities and usable with the both the universe as well as the multiverse plot creators. The function calls the xr.DataArray.plot or xr.Dataset.plot function directly which return automatically layouted visualizations of the data in form of a xarray.FacetGrid object. If a user wants to specify the plot to be generated, he/she can specify the plot kind which wraps all available xarray.plot.<kind> functions (c.f. their docu).
I suspect the function to also be compatible with pandas objects, so they should not only be limited to xarray data structures. :)
Resulting figures from the FFM model config
Just change a single line of configuration
tree_density_facet_grid_2D.pdf tree_density_facet_grid_2D.pdf tree_density_facet_grid_2D.pdf tree_density_facet_grid_2D.pdf tree_density_facet_grid_1D.pdf
Up for discussion
-
Should we include an example run-eval configuration pair in the ForestFiremodel within acfgsfolder inside of the model directory? This would have a few advantages:- Easily recreate
ForestFiredefault plots. - Having blueprint config available for the FFM that can easily be adapted.
- Could include the run and eval in the CI model tests to let multiverse plots be easily tested.
- Easily recreate
-
Should we add this generic plot in the CopyMeGrid/Graphmodels as disabled multiverse plots? -
enough documentation?
Is there something that needs to be double checked?
Can this MR be accepted?
-
Implemented the changes -
Implemented the generic facet_gridplot --> in utopia/dantro!153 -
Implemented two example plot functions in the FFM that plot tree densities for different seeds and lightning probabilities as an example. -
Test them in the GitLab ci pipeline
-
-
Included the facet_gridplot in thebase_plots.ymlconfiguration as include from dantros external plot functions -
Implemented examples in CopyMeGridandCopyMeGraph-
Added multiverse run-eval configuration example containing the facet_gridplot -
Added facet_gridin the base configurations
-
-
-
Added Model.run_and_eval_cfg_pathsmethod to dynamically find additional run and eval configuration pairs -
Added or extended tests -
facet_gridintegration test for several models -
Models test their additional configurations -
Model.run_and_eval_cfg_pathstest
-
-
Added or updated documentation: Included the plot function in the base_plots.ymlDAG related plotting functions -
Reasonably up-to-date with current master -
Pipeline passing without warnings -
History cleaned up (do not squash!) -
Approved by @herdeanu -
Approved by @blsqr (once discussions are resolved)
Related issues
Closes #106 (closed)