create_legend_handles#

pymc_marketing.plot.create_legend_handles(colors, alpha=0.5, line=True, patch=True)[source]#

Create the legend handles for the given colors.

Parameters:
colorsIterable[str]

The colors to create the legend handles.

alphafloat, optional

The alpha value for the patches, by default 0.5.

linebool, optional

Whether to include the line, by default True.

patchbool, optional

Whether to include the patch, by default True.

Returns:
list[Line2D | Patch | tuple[Line2D, Patch]]

The legend handles.