arviz_plots.backend.bokeh.legend

Contents

arviz_plots.backend.bokeh.legend#

arviz_plots.backend.bokeh.legend(plot_collection, kwarg_list, label_list, title=None, visual_type='line', visual_kwargs=None, legend_dim=None, update_visuals=False, legend_target=None, side='right', **kwargs)[source]#

Generate a legend on a figure given lists of labels and property kwargs.

Parameters:
plot_collectionPlotCollection
kwarg_listsequence of mapping

Sequence with length equal to the number of entries to add to the legend. The elements in the list are the kwargs to use when defining the legend miniatures.

label_listsequence of str

Sequence with length equal to the number of entries to add to the legend. The elements in the list are the labels to give each miniature in the legend.

titlestr, optional

The title to give the legend.

visual_type{“line”, “scatter”, “rectangle”}, default “line”
visual_kwargsmapping, optional

Passed to all visuals when generating legend miniatures. For “line” visual type passed to bokeh.plotting.figure.line

legend_dimstr or sequence of str, optional

Dimension or dimensions whose mappings should be used to generate the legend.

update_visualsbool, optional

If relevant for the backend, update objects representing visual elements of the plot to improve or allow interactivity for the legend.

legend_target(int, int), default (0, -1)

Row and colum indicators of the plot where the legend will be placed. Bokeh does not support figure level legend.

sidestr, optional

Side of the plot on which to place the legend. Use “center” to put the legend inside the plotting area.

**kwargs

Passed to bokeh.models.Legend