add_text¶

Subplot.add_text(text, position=(0, 0, 0), size=14, face_color='w', outline_color='w', outline_thickness=0, screen_space=True, anchor='middle-center', *args, **kwargs)¶

Create a text Graphic

Parameters:
  • text (str) – display text

  • position (int tuple, default (0, 0, 0)) – int tuple indicating location of text in scene

  • size (int, default 10) – text 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 (int, default 0) – text outline thickness

  • screen_space (bool = True) – whether the text is rendered in screen space, in contrast to world space

  • name (str, optional) – name of graphic, passed to Graphic

  • 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”

Return type:

TextGraphic