class_docstr: Base class of all Geoms
class_docstr_tok: ["Base","class","of","all","Geoms"]
docstr: Plot data belonging to a unit.
  
  A matplotlib plot function may require that an aethestic
  have a single unique value. e.g. linestyle='dashed' and
  not linestyle=['dashed', 'dotted', ...].
  A single call to such a function can only plot lines with
  the same linestyle. However, if the plot we want has more
  than one line with different linestyles, we need to group
  the lines with the same linestyle and plot them as one
  unit. In this case, draw_group calls this function to do
  the plotting. For an example see
  [](`~plotnine.geoms.geom_point`).
  
  Parameters
  ----------
  data :
      Data to be plotted by this geom. This is the
      dataframe created in the plot_build pipeline.
  panel_params :
      The scale information as may be required by the
      axes. At this point, that information is about
      ranges, ticks and labels. Keys of interest to
      the geom are:
  
      ```python
      "x_range"  # tuple
      "y_range"  # tuple
      ```
  
      In rare cases a geom may need access to the x or y scales.
      Those are available at:
  
      ```python
      "scales"   # SimpleNamespace
      ```
  coord :
      Coordinate (e.g. coord_cartesian) system of the
      geom.
  ax :
      Axes on which to plot.
  params :
      Combined parameters for the geom and stat. Also
      includes the `zorder`.
docstr_tok: ["Plot","data","belonging","to","a","unit",".","A","matplotlib","plot","function","may","require","that","an","aethestic","have","a","single","unique","value",".","e.g",".","linestyle='dashed","'","and","not","linestyle=","[","'dashed","'",",","'dotted","'",",","...","]",".","A","single","call","to","such","a","function","can","only","plot","lines","with","the","same","linestyle",".","However",",","if","the","plot","we","want","has","more","than","one","line","with","different","linestyles",",","we","need","to","group","the","lines","with","the","same","linestyle","and","plot","them","as","one","unit",".","In","this","case",",","draw_group","calls","this","function","to","do","the","plotting",".","For","an","example","see","[","]","(","`","~plotnine.geoms.geom_point","`",")",".","Parameters","--","--","--","--","--","data",":","Data","to","be","plotted","by","this","geom",".","This","is","the","dataframe","created","in","the","plot_build","pipeline",".","panel_params",":","The","scale","information","as","may","be","required","by","the","axes",".","At","this","point",",","that","information","is","about","ranges",",","ticks","and","labels",".","Keys","of","interest","to","the","geom","are",":","``","`","python","``","x_range","''","#","tuple","``","y_range","''","#","tuple","``","`","In","rare","cases","a","geom","may","need","access","to","the","x","or","y","scales",".","Those","are","available","at",":","``","`","python","``","scales","''","#","SimpleNamespace","``","`","coord",":","Coordinate","(","e.g",".","coord_cartesian",")","system","of","the","geom",".","ax",":","Axes","on","which","to","plot",".","params",":","Combined","parameters","for","the","geom","and","stat",".","Also","includes","the","`","zorder","`","."]
code: def draw_unit(
      data: pd.DataFrame,
      panel_params: panel_view,
      coord: Coord,
      ax: Axes,
      **params: Any,
  ):
      """
      Plot data belonging to a unit.
  
      A matplotlib plot function may require that an aethestic
      have a single unique value. e.g. linestyle='dashed' and
      not linestyle=['dashed', 'dotted', ...].
      A single call to such a function can only plot lines with
      the same linestyle. However, if the plot we want has more
      than one line with different linestyles, we need to group
      the lines with the same linestyle and plot them as one
      unit. In this case, draw_group calls this function to do
      the plotting. For an example see
      [](`~plotnine.geoms.geom_point`).
  
      Parameters
      ----------
      data :
          Data to be plotted by this geom. This is the
          dataframe created in the plot_build pipeline.
      panel_params :
          The scale information as may be required by the
          axes. At this point, that information is about
          ranges, ticks and labels. Keys of interest to
          the geom are:
  
          ```python
          "x_range"  # tuple
          "y_range"  # tuple
          ```
  
          In rare cases a geom may need access to the x or y scales.
          Those are available at:
  
          ```python
          "scales"   # SimpleNamespace
          ```
      coord :
          Coordinate (e.g. coord_cartesian) system of the
          geom.
      ax :
          Axes on which to plot.
      params :
          Combined parameters for the geom and stat. Also
          includes the `zorder`.
      """
      msg = "The geom should implement this method."
      raise NotImplementedError(msg)
  
imports: from __future__ import annotations
  import typing
  from abc import ABC
  from copy import deepcopy
  from itertools import chain, repeat
  from .._utils import copy_keys, data_mapping_as_kwargs, is_list_like, remove_missing
  from .._utils.registry import Register, Registry
  from ..exceptions import PlotnineError
  from ..layer import layer
  from ..mapping.aes import is_valid_aesthetic, rename_aesthetics
  from ..mapping.evaluation import evaluate
  from ..positions.position import position
  from ..stats.stat import stat
label_desc: Use image node_id 10 for calling the geom obj's underlying member method code with example usage: obj.draw_unit(data, panel_params, coord, ax) without return types