plotnine.guides.guide.guide

class plotnine.guides.guide.guide(**kwargs)[source]

Base class for all guides

Parameters:
titlestr | None

Title of the guide. If None, title is not shown. Default is the name of the aesthetic or the name specified using lab

title_positionstr in ['top', 'bottom', 'left', 'right']

Position of title

title_themeelement_text

Control over the title theme. Default is to use legend_title in a theme.

title_hjustfloat

Horizontal justification of title text.

title_vjustfloat

Vertical justification of title text.

title_separationfloat

Separation between the title text and the colorbar. Value is in pixels.

labelbool

Whether to show labels

label_positionstr in ['top', 'bottom', 'left', 'right']

Position of the labels. The defaults are 'bottom' for a horizontal guide and 'right' for a vertical guide.

label_themeelement_text

Control over the label theme. Default is to use legend_text in a theme.

label_hjustfloat

Horizontal justification of label text.

label_vjustfloat

Vertical justification of label text.

label_separationfloat

Separation between the label text and the colorbar. Value is in pixels.

directionstr in ['horizontal', 'vertical']

Direction of the guide.

default_unitstr

Unit for keywidth and keyheight

override_aesdict

Aesthetic parameters of legend key.

reversebool

Whether to reverse the order of the legends.

orderint

Order of this guide among multiple guides. Should be in the range [0, 99]. Default is 0.

Notes

At the moment not all parameters have been fully implemented.