code: def geom_ydotplot(
      mapping=None,
      *,
      data=None,
      show_legend=None,
      sampling=None,
      tooltips=None,
      binwidth=None,
      bins=None,
      method=None,
      stackdir=None,
      stackratio=None,
      dotsize=None,
      stackgroups=None,
      center=None,
      boundary=None,
      color_by=None,
      fill_by=None,
      **other_args,
  ):
      """
      Dotplot represents individual observations in a batch of data with circular dots.
      The diameter of a dot corresponds to the maximum width or bin width, depending on the binning algorithm.
      `geom_ydotplot()` is an obvious blend of `geom_violin()` and `geom_dotplot()`.
  
      Parameters
      ----------
      mapping : `FeatureSpec`
          Set of aesthetic mappings created by `aes()` function.
          Aesthetic mappings describe the way that variables in the data are
          mapped to plot "aesthetics".
      data : dict or Pandas or Polars `DataFrame`
          The data to be displayed in this layer. If None, the default, the data
          is inherited from the plot data as specified in the call to ggplot.
      show_legend : bool, default=True
          False - do not show legend for this layer.
      sampling : `FeatureSpec`
          Result of the call to the `sampling_xxx()` function.
          To prevent any sampling for this layer pass value "none" (string "none").
      tooltips : `layer_tooltips`
          Result of the call to the `layer_tooltips()` function.
          Specify appearance, style and content.
      binwidth : float
          When method is 'dotdensity', this specifies maximum bin width.
          When method is 'histodot', this specifies bin width.
      bins : int, default=30
          When method is 'histodot', this specifies number of bins. Overridden by `binwidth`.
      method : {'dotdensity', 'histodot'}, default='dotdensity'
          Use 'dotdensity' for dot-density binning,
          or 'histodot' for fixed bin widths (like in geom_histogram).
      stackdir : {'left', 'right', 'center', 'centerwhole'}, default='center'
          Which direction to stack the dots.
      stackratio : float, default=1.0
          How close to stack the dots.
          Use smaller values for closer, overlapping dots.
      dotsize : float, default=1.0
          The diameter of the dots relative to binwidth.
      stackgroups : bool, default=False
          Separate overlapping stack groups when stackgroups=False.
          Overlap stack groups when method='dotdensity' and stackgroups=True.
          Stack dots across groups when method='histodot' and stackgroups=True.
      center : float
          When method is 'histodot', this specifies x-value to align bin centers to.
      boundary : float
          When method is 'histodot', this specifies x-value to align bin boundary
          (i.e. point between bins) to.
      color_by : {'fill', 'color', 'paint_a', 'paint_b', 'paint_c'}, default='color'
          Define the color aesthetic for the geometry.
      fill_by : {'fill', 'color', 'paint_a', 'paint_b', 'paint_c'}, default='fill'
          Define the fill aesthetic for the geometry.
      other_args
          Other arguments passed on to the layer.
          These are often aesthetics settings used to set an aesthetic to a fixed value,
          like color='red', fill='blue', size=3 or shape=21.
          They may also be parameters to the paired geom/stat.
  
      Returns
      -------
      `LayerSpec`
          Geom object specification.
  
      Notes
      -----
      With 'dotdensity' binning, the bin positions are determined by the data and binwidth, which is the maximum width of each bin.
      With 'histodot' binning, the bins have fixed positions and fixed widths, much like a histogram.
  
      Computed variables:
  
      - ..count.. : number of points with y-axis coordinate in the same bin.
      - ..binwidth.. : max width of each bin if method is 'dotdensity'; width of each bin if method is 'histodot'.
  
      `geom_ydotplot()` understands the following aesthetics mappings:
  
      - x : x-axis value.
      - y : y-axis value.
      - alpha : transparency level of a layer. Accept values between 0 and 1.
      - color (colour) : color of the geometry lines. String in the following formats: RGB/RGBA (e.g. "rgb(0, 0, 255)"); HEX (e.g. "#0000FF"); color name (e.g. "red"); role name ("pen", "paper" or "brush").
      - fill : fill color. String in the following formats: RGB/RGBA (e.g. "rgb(0, 0, 255)"); HEX (e.g. "#0000FF"); color name (e.g. "red"); role name ("pen", "paper" or "brush").
      - stroke : width of the dot border.
  
      Examples
      --------
      .. jupyter-execute::
          :linenos:
          :emphasize-lines: 8
  
          import numpy as np
          from lets_plot import *
          LetsPlot.setup_html()
          np.random.seed(42)
          n = 100
          x = np.random.choice(['A', 'B'], size=n)
          y = np.random.normal(size=n)
          ggplot({'x': x, 'y': y}, aes('x', 'y')) + geom_ydotplot()
  
      |
  
      .. jupyter-execute::
          :linenos:
          :emphasize-lines: 9-11
  
          import numpy as np
          from lets_plot import *
          LetsPlot.setup_html()
          np.random.seed(42)
          n = 100
          x = np.random.choice(['A', 'B'], size=n)
          y = np.random.gamma(0.75, size=n)
          ggplot({'x': x, 'y': y}, aes('x', 'y')) + \\
              geom_ydotplot(aes(fill='x'), color='black', \\
                            binwidth=.15, method='histodot', \\
                            boundary=0.0, dotsize=.75)
  
      |
  
      .. jupyter-execute::
          :linenos:
          :emphasize-lines: 9-14
  
          import numpy as np
          from lets_plot import *
          LetsPlot.setup_html()
          np.random.seed(42)
          n = 100
          x = np.random.choice(['A', 'B', 'C'], size=n)
          y = np.random.normal(size=n)
          ggplot({'x': x, 'y': y}, aes('x', 'y')) + \\
              geom_ydotplot(color='black', fill='#d7191c', \\
                            method='dotdensity', binwidth=.2,
                            stackdir='left', stackratio=.8) + \\
              geom_ydotplot(color='black', fill='#2c7bb6', \\
                            method='histodot', binwidth=.2, \\
                            stackdir='right', stackratio=.8)
  
      """
      if "stat" in other_args:
          print(
              "WARN: using 'stat' parameter for dotplot was deprecated."
          )
          other_args.pop("stat")
  
      return _geom(
          "ydotplot",
          mapping=mapping,
          data=data,
          stat=None,
          position=None,
          show_legend=show_legend,
          sampling=sampling,
          tooltips=tooltips,
          binwidth=binwidth,
          bins=bins,
          method=method,
          stackdir=stackdir,
          stackratio=stackratio,
          dotsize=dotsize,
          stackgroups=stackgroups,
          center=center,
          boundary=boundary,
          color_by=color_by,
          fill_by=fill_by,
          **other_args,
      )
  
imports: from lets_plot.geo_data_internals.utils import is_geocoder
  from .core import FeatureSpec, LayerSpec
  from .util import as_annotated_data, is_geo_data_frame, geo_data_frame_to_crs, get_geo_data_frame_meta
label_desc: Use image node_id 24 for calling a global function with example usage: geom_ydotplot(mapping) and returns: _geom