class_docstr: Base class for all guides
  
  Parameters
  ----------
  title : str, default=None
      Title of the guide. If `None`, title is not shown.
      Default is the name of the aesthetic or the name
      specified using [](`~plotnine.components.labels.lab`)
  title_position : str, default="auto"
      Position of title. One of
      `["top", "bottom", "left", "right"]`{.py}
  title_theme : element_text, default=None
      Control over the title theme.
      Default is to use `legend_title` in a theme.
  title_hjust : float, default=None
      Horizontal justification of title text.
  title_vjust : float, default=None
      Vertical justification of title text.
  title_separation : float, default=None
      Separation between the title text and the colorbar.
      Value is in pixels.
  label : bool, default=True
      Whether to show labels
  label_position : str, default="auto"
      Position of the labels.
      One of `["top", "bottom", "left", "right"]`{.py}.
      The default is "bottom" for a horizontal guide and
      "right" for a vertical guide.
  label_theme : element_text, default=None
      Control over the label theme.
      Default is to use `legend_text` in a theme.
  label_hjust : float, default=None
      Horizontal justification of label text.
  label_vjust : float, default=None
      Vertical justification of label text.
  label_separation : float, default=None
      Separation between the label text and the colorbar.
      Value is in pixels.
  direction : Literal["horizontal", "vertical", "auto"], default="auto"
      Direction of the guide. The default is depends on
      [](`~plotnine.themes.themeable.legend_position`).
  default_unit : str, default="lines"
      Unit for `keywidth` and `keyheight`.
  override_aes : dict, default={}
      Aesthetic parameters of legend key.
  reverse : bool, default=False
      Whether to reverse the order of the legends.
  order : int, default=0
      Order of this guide among multiple guides.
      Should be in the range [0, 99].
  
  Notes
  -----
  At the moment not all parameters have been fully implemented.
class_docstr_tok: ["Base","class","for","all","guides","Parameters","--","--","--","--","--","title",":","str",",","default=None","Title","of","the","guide",".","If","`","None","`",",","title","is","not","shown",".","Default","is","the","name","of","the","aesthetic","or","the","name","specified","using","[","]","(","`","~plotnine.components.labels.lab","`",")","title_position",":","str",",","default=","''","auto","''","Position","of","title",".","One","of","`","[","``","top","''",",","``","bottom","''",",","``","left","''",",","``","right","''","]","`","{",".py","}","title_theme",":","element_text",",","default=None","Control","over","the","title","theme",".","Default","is","to","use","`","legend_title","`","in","a","theme",".","title_hjust",":","float",",","default=None","Horizontal","justification","of","title","text",".","title_vjust",":","float",",","default=None","Vertical","justification","of","title","text",".","title_separation",":","float",",","default=None","Separation","between","the","title","text","and","the","colorbar",".","Value","is","in","pixels",".","label",":","bool",",","default=True","Whether","to","show","labels","label_position",":","str",",","default=","''","auto","''","Position","of","the","labels",".","One","of","`","[","``","top","''",",","``","bottom","''",",","``","left","''",",","``","right","''","]","`","{",".py","}",".","The","default","is","``","bottom","''","for","a","horizontal","guide","and","``","right","''","for","a","vertical","guide",".","label_theme",":","element_text",",","default=None","Control","over","the","label","theme",".","Default","is","to","use","`","legend_text","`","in","a","theme",".","label_hjust",":","float",",","default=None","Horizontal","justification","of","label","text",".","label_vjust",":","float",",","default=None","Vertical","justification","of","label","text",".","label_separation",":","float",",","default=None","Separation","between","the","label","text","and","the","colorbar",".","Value","is","in","pixels",".","direction",":","Literal","[","``","horizontal","''",",","``","vertical","''",",","``","auto","''","]",",","default=","''","auto","''","Direction","of","the","guide",".","The","default","is","depends","on","[","]","(","`","~plotnine.themes.themeable.legend_position","`",")",".","default_unit",":","str",",","default=","''","lines","''","Unit","for","`","keywidth","`","and","`","keyheight","`",".","override_aes",":","dict",",","default=","{","}","Aesthetic","parameters","of","legend","key",".","reverse",":","bool",",","default=False","Whether","to","reverse","the","order","of","the","legends",".","order",":","int",",","default=0","Order","of","this","guide","among","multiple","guides",".","Should","be","in","the","range","[","0",",","99","]",".","Notes","--","--","-","At","the","moment","not","all","parameters","have","been","fully","implemented","."]
docstr: Create the key for the guide
  
  Returns guide if training is successful
docstr_tok: ["Create","the","key","for","the","guide","Returns","guide","if","training","is","successful"]
code: def train(
      self, scale: scale, aesthetic: Optional[str] = None
  ) -> guide | None:
      """
      Create the key for the guide
  
      Returns guide if training is successful
      """
  
file_path: plotnine/plotnine/guides/guide.py
imports: from __future__ import annotations
  import typing
  from abc import ABC
  from .._utils.registry import Register
  from ..exceptions import PlotnineError
label_desc: Use image node_id 4 for calling the guide obj's underlying member method code with example usage: obj.train(scale, aesthetic) without return types