diff --git a/holoviews/plotting/bokeh/plot.py b/holoviews/plotting/bokeh/plot.py index 7d3cdd407a..202f1711e9 100644 --- a/holoviews/plotting/bokeh/plot.py +++ b/holoviews/plotting/bokeh/plot.py @@ -700,7 +700,7 @@ class LayoutPlot(CompositePlot, GenericLayoutPlot): "bottom_right", 'right', 'left', 'top', 'bottom'], - default="right", + default="top_right", doc=""" Allows selecting between a number of predefined legend position options.""") diff --git a/holoviews/plotting/bokeh/util.py b/holoviews/plotting/bokeh/util.py index 2a8244e003..ca4df5c41d 100644 --- a/holoviews/plotting/bokeh/util.py +++ b/holoviews/plotting/bokeh/util.py @@ -33,7 +33,7 @@ from ...core.layout import Layout from ...core.ndmapping import NdMapping -from ...core.overlay import Overlay +from ...core.overlay import Overlay, NdOverlay from ...core.util import ( arraylike_types, callable_name, cftime_types, cftime_to_timestamp, isnumeric, pd, unique_array @@ -485,6 +485,8 @@ def select_legends(holoviews_layout, figure_index=None, legend_position="top_rig holoviews_layout = [holoviews_layout] for i, plot in enumerate(holoviews_layout): + if not isinstance(plot, (NdOverlay, Overlay)): + continue if i in figure_index: plot.opts(show_legend=True, legend_position=legend_position) else: