Open OriolAbril opened 4 months ago
Here is an example of getting an interactive legend working with plot_dist
. As we can pass arbitrary elements as aesthetics and as plot_kwargs everything is feasible already, but we might want to set that behaviour as the default (maybe only when there are multiple models for example, with docs on doing that also for plot_dist with chains as different colors...).
Note: to make that a default the legendgroup
argument should become part of the common interface (with this or another name) and be ignored for backends where it makes no sense.
Interactive legend in plot_dist
or with plot_forest:
Screencast de 9-7-24 22:30:39.webm
At least some of this functionality is supported by matplotlib. See here https://matplotlib.org/stable/gallery/event_handling/legend_picking.html
Do we want to support interactivity for matplotlib too?
We might want to provide tooltip and grouping information somehow as part of the common plotting interface. Even if some backends can't include that into the plot, it would be a great win for those that can.