Implement a multiplot that can flexibly call various plot functions
The idea to create a generic multiplot function arose from a discussion in #146 . This issue describes the first step of creating a flexible dag-based multiplot
function in the multiplot.py
module. This description mainly summarizes the main ideas for the first step from the discussions.
Proposal
In this first version, the multiplot
function should have the following configuration interface:
# Single axis
my_single_axis_plot:
based_on: dag.multiplot
to_plot:
- function: sns.scatterplot # lookup from dict of plot functions
x: !dag_result x
y: !dag_result y
# ...
- function: !dag_result some_callable # ... can also be sns.despine or whatever else works with an ax object
# ...
Implement multiplot
for single axis, assuming to_plot
to be list-like and raising NotImplementedError
otherwise.
- Have a free function
apply_plot_func(ax, plot_spec: list, **kwargs)
(or something like that) which takes care of the application of multiple such plot specifications on a single axis object- Use
try-except
to allow that a single such invocation can also fail
- Use
- Also have some small function that takes care of the lookup of the
function
argument
How to test the implementation?
Call the plot function with various configurations.
People involved
Related issues
Meta issue: #146