plotnine.geom_text

geom_text(mapping=None, data=None, kwargs={})

Textual annotations

{usage}

Parameters

parse : bool = False

If True, the labels will be rendered with latex.

nudge_x : float = 0

Horizontal adjustment to apply to the text

nudge_y : float = 0

Vertical adjustment to apply to the text

adjust_text

Parameters to adjust_text will repel overlapping texts. This parameter takes priority of over nudge_x and nudge_y. adjust_text does not work well when it is used in the first layer of the plot, or if it is the only layer. For more see the documentation at https://github.com/Phlya/adjustText/wiki .

format_string : str = None

If not None, then the text is formatted with this string using str.format e.g:

# 2.348 -> "2.35%"
geom_text(format_string="{:.2f}%")
path_effects : list = None

If not None, then the text will use these effects. See documentation for more details.

See Also

geom_label
Text
patheffects