class_docstr: Theme element: Text
  
  Parameters
  ----------
  family :
      Font family. See :meth:`matplotlib.text.Text.set_family`
      for supported values.
  style :
      Font style
  color :
      Text color
  weight :
      Should be one of `normal`, `bold`, `heavy`, `light`,
      `ultrabold` or `ultralight`.
  size :
      text size
  ha :
      Horizontal Alignment.
  va :
      Vertical alignment.
  rotation :
      Rotation angle in the range [0, 360]
  linespacing : float
      Line spacing
  backgroundcolor :
      Background color
  margin :
      Margin around the text. The keys are
      `t`, `b`, `l`, `r` and `units`.
      The `tblr` keys are floats.
      The `units` is one of `pt`, `lines` or `in`.
      Not all text themeables support margin parameters and other
      than the `units`, only some of the other keys may apply.
  kwargs :
      Parameters recognised by :class:`matplotlib.text.Text`
  
  Notes
  -----
  [](`~plotnine.themes.element_text`) will accept parameters that
  conform to the **ggplot2** *element_text* API, but it is preferable
  the **Matplotlib** based API described above.
class_docstr_tok: ["Theme","element",":","Text","Parameters","--","--","--","--","--","family",":","Font","family",".","See",":","meth",":","`","matplotlib.text.Text.set_family","`","for","supported","values",".","style",":","Font","style","color",":","Text","color","weight",":","Should","be","one","of","`","normal","`",",","`","bold","`",",","`","heavy","`",",","`","light","`",",","`","ultrabold","`","or","`","ultralight","`",".","size",":","text","size","ha",":","Horizontal","Alignment",".","va",":","Vertical","alignment",".","rotation",":","Rotation","angle","in","the","range","[","0",",","360","]","linespacing",":","float","Line","spacing","backgroundcolor",":","Background","color","margin",":","Margin","around","the","text",".","The","keys","are","`","t","`",",","`","b","`",",","`","l","`",",","`","r","`","and","`","units","`",".","The","`","tblr","`","keys","are","floats",".","The","`","units","`","is","one","of","`","pt","`",",","`","lines","`","or","`","in","`",".","Not","all","text","themeables","support","margin","parameters","and","other","than","the","`","units","`",",","only","some","of","the","other","keys","may","apply",".","kwargs",":","Parameters","recognised","by",":","class",":","`","matplotlib.text.Text","`","Notes","--","--","-","[","]","(","`","~plotnine.themes.element_text","`",")","will","accept","parameters","that","conform","to","the","*","*","ggplot2","*","*","*","element_text","*","API",",","but","it","is","preferable","the","*","*","Matplotlib","*","*","based","API","described","above","."]
docstr: Translate ggplot2 justification from [0, 1] to top, bottom, center.
docstr_tok: ["Translate","ggplot2","justification","from","[","0",",","1","]","to","top",",","bottom",",","center","."]
code: def _translate_vjust(
      self, just: float
  ) -> Literal["top", "bottom", "center"]:
      """
      Translate ggplot2 justification from [0, 1] to top, bottom, center.
      """
      if just == 0:
          return "bottom"
      elif just == 1:
          return "top"
      else:
          return "center"
  
file_path: plotnine/plotnine/themes/elements/element_text.py
imports: from __future__ import annotations
  from contextlib import suppress
  from typing import TYPE_CHECKING
  from .element_base import element_base
  from .margin import Margin
label_desc: Use image node_id 4 for calling the element_text obj's underlying member method code with example usage: obj._translate_vjust(just) and returns: str, str, str