It would be nice to allow precomputing stats/summaries/diagnostics for plot_xyz functions (when using PlotCollection directly changing the data allows that, which is what we use _within plot_xyz functions). One proposal would be something somewhat similar to #37, however, instead of splitting the behaviour on False or different, we could:
isinstance(stats_kwargs["key"], xarray.Dataset) -> assume it's the result of "key" operation and don't call the stats function
otherwise call the stats function as we currently do
Note that this wouldn't only allow precomputing things but would also enable use of plot_xyz functions with arbitrary user defined functions such as experimental credible interval estimators, kdes from other libraries... provided the users themselves bridge the gap of making the data match the structure of the kind of plot they are calling.
It would be nice to allow precomputing stats/summaries/diagnostics for
plot_xyz
functions (when using PlotCollection directly changing the data allows that, which is what we use _withinplot_xyz
functions). One proposal would be something somewhat similar to #37, however, instead of splitting the behaviour onFalse
or different, we could:isinstance(stats_kwargs["key"], xarray.Dataset)
-> assume it's the result of "key" operation and don't call the stats functionNote that this wouldn't only allow precomputing things but would also enable use of
plot_xyz
functions with arbitrary user defined functions such as experimental credible interval estimators, kdes from other libraries... provided the users themselves bridge the gap of making the data match the structure of the kind of plot they are calling.