plotnine.themes.themeable.legend_position

legend_position(theme_element)

Location of legend

Parameters

theme_element : Literal["right", "left", "top", "bottom", "inside"] | tuple[float, float] | Literal["none"]

Where to put the legend. Along the edge or inside the panels.

If “inside”, the default location is legend_position_inside.

A tuple of values implies “inside” the panels at those exact values, which should be in the range [0, 1] within the panels area.

A value of "none" turns off the legend.