holoviz / holoviews

With Holoviews, your data visualizes itself.
https://holoviews.org
BSD 3-Clause "New" or "Revised" License
2.7k stars 403 forks source link

`show_legend` doesn't have the same effect given the selected backend #5217

Open maximlt opened 2 years ago

maximlt commented 2 years ago

The show_legend option doesn't have the same effect given the selected backend. In the example below with show_legend=True the legend is displayed with Plotly. It is not displayed with both Bokeh and Matplotlib. For the sake of consistency, and in particular for hvPlot which will soon support the three backends, it'd be nice to align the behavior of the three backends on this option. My feeling would be to adapt Plotly to what Bokeh/Matplotlib does.

image image

jbednar commented 2 years ago

I think adapting the plotly behavior is the simplest path. I guess there could be some argument for the ability to force a legend to be shown even in this case, but someone would need to push for that, and I'd expect most people not to want one even though the option is true, when there is only one curve.

jlstevens commented 2 years ago

I'd expect most people not to want one even though the option is true, when there is only one curve.

I think this was the reasoning behind the Bokeh/Matplotlib behavior. I vote to be consistent with those two backends.