@@ -427,13 +427,15 @@ def _line_plot_bokeh(
427427 marker : MarkerData | None ,
428428 subplot : Any | None = None ,
429429) -> "bokeh.plotting.figure" :
430+ from bokeh import themes
430431 from bokeh .io import curdoc
431- from bokeh .models import Legend , LegendItem , Scatter , Span
432+ from bokeh .models import Scatter
433+ from bokeh .models .annotations import Legend , LegendItem , Span
432434 from bokeh .plotting import figure
433435
434436 if template is None :
435437 template = "light_minimal"
436- curdoc ().theme = template
438+ curdoc ().theme = themes . built_in_themes [ template ]
437439
438440 if subplot is not None :
439441 p = subplot
@@ -534,10 +536,10 @@ def _grid_line_plot_bokeh(
534536 from bokeh .layouts import gridplot
535537 from bokeh .plotting import figure
536538
537- plots : list [list [figure ]] = []
539+ plots : list [list [Any ]] = []
538540
539541 for row in range (n_rows ):
540- subplot_row : list [figure ] = []
542+ subplot_row : list [Any ] = []
541543 for col in range (n_cols ):
542544 idx = row * n_cols + col
543545 if idx >= len (lines_list ):
0 commit comments