plotnine.facets.labelling.label_context

plotnine.facets.labelling.label_context(label_info, multi_line=True, sep=': ')[source]

Create an unabiguous label string

If facetting over a single variable, label_value is used, if two or more variables then label_both is used.

Parameters:
label_info : series

Series whose values will be returned. It must have an index made of variable names

multi_line : bool

Whether to place each variable on a separate line

sep : str

Separation between variable name and value

Returns:
out : str

Contatenated label values (or pairs of variable names & values)