add_text#

Subplot.add_text(text, font_size=14, face_color='w', outline_color='w', outline_thickness=0.0, screen_space=True, offset=(0, 0, 0), anchor='middle-center', **kwargs)#

Create a text Graphic

Parameters:
  • text (str) – text to display

  • font_size (float | int, default 10) – font size

  • face_color (str or array, default "w") – str or RGBA array to set the color of the text

  • outline_color (str or array, default "w") – str or RGBA array to set the outline color of the text

  • outline_thickness (float, default 0) – relative outline thickness, value between 0.0 - 0.5

  • screen_space (bool = True) – if True, text size is in screen space, if False the text size is in data space

  • offset ((float, float, float), default (0, 0, 0)) – places the text at this location

  • anchor (str, default "middle-center") –

    position of the origin of the text a string representing the vertical and horizontal anchors, separated by a dash

    • Vertical values: “top”, “middle”, “baseline”, “bottom”

    • Horizontal values: “left”, “center”, “right”

  • **kwargs – passed to Graphic

Return type:

TextGraphic