AlgebraOfGraphics.jl
AlgebraOfGraphics.jl copied to clipboard
Interface for common calculation of analysis attributes
So far extrema for density plots and bins for histograms are computed globally (they are the same for all variables in all subplots).
We currently do not have an interface to decide whether they should be computed globally, per subplot (to allow different subplots to have different bins, while still having consistent bins per subplots to stack or dodge) or per trace.
A possible approach could be to completely outsource this to the user, and pass as bins (or any other attribute) a function that takes as input a Dict whose keys encode the "primary variables" that specify which trace it is and whose values are positional and named arguments for the analysis. This function would return another Dict with the bins information.
This sounds involved, why not density(extrema=:global) where :global could be replaced with :subplot or :trace?
A possible approach could be to completely outsource this to the user
such an approach might also solve https://github.com/JuliaPlots/AlgebraOfGraphics.jl/issues/266 -- namely "Interface for common access to analysis attributes"