I have a question for the devs. It seems like plotting classes define the same attributes over and over again. E.g. in the mpl backend, the show_legend
param is defined separately in all these classes:
(holoviews.plotting.mpl.raster.RasterBasePlot,
holoviews.plotting.mpl.plot.GridPlot,
holoviews.plotting.mpl.chart.AreaPlot,
holoviews.plotting.mpl.chart.SpreadPlot,
holoviews.plotting.mpl.path.PolygonPlot,
holoviews.plotting.mpl.chart.BarPlot,
holoviews.plotting.mpl.annotation.AnnotationPlot,
holoviews.plotting.plot.GenericOverlayPlot,
holoviews.plotting.mpl.path.PathPlot,
holoviews.plotting.mpl.element.LegendPlot,
holoviews.plotting.mpl.chart.CurvePlot,
holoviews.plotting.mpl.raster.QuadMeshPlot,
holoviews.plotting.plot.GenericElementPlot)
whereas given current inheritance structure, one could do with as few as
{holoviews.plotting.mpl.plot.GridPlot,
holoviews.plotting.plot.GenericElementPlot}
What is the reasoning here? Why is this necessary? Does this come from a time before the option tree was there that enabled (or not?) easy setting of default values for each element?
The background is that I was looking into https://github.com/holoviz/holoviews/issues/3829 again, specifically option 1 since it looks like a low-hanging fruit, and I’m not sure why there’s something called LegendPlot
if it isn’t strictly the parent class of all plots with the legend-related options.