code: def discrete_scatter(
      x,
      y,
      c,
      unique_c=None,
      legend="first",
      clip_outliers=True,
      alpha="auto",
      s="auto",
      ax=None,
      jitter_x=False,
      jitter_y=False,
      **kwargs,
  ):
      """Scatter plot for categories.
  
      Creates a scatter plot for x and y grouped by c.
  
  
      Parameters
      ----------
      x : array-like
          x coordinates to scatter.
      y : array-like
          y coordinates to scatter.
      c : array-like
          Grouping of samples (similar to hue in seaborn).
      unique_c : array-like, default='None'
          Unique values of c considered in scatter. If not
          provided unique elements of c are determined.
      legend : bool, or "first", default="first"
          Whether to create a legend. "first" mean only the
          first one in a given gridspec.
      clip_outliers : bool, default='True'
          Whether to clip outliers in x and y. The limits are
          determined based on 0.01 and 0.99 quantiles of x and
          y ignoring nan values.
      alpha : float, default='auto'
          Alpha values for scatter plots. 'auto' is dirty hacks.
      s : float, default='auto'.
          Marker size for scatter plots. 'auto' is dirty hacks.
      ax : matplotlib axes, default=None
          Axes to plot into.
      jitter_x : bool, default='False'
          Whether to jitter x coordinates.
      jitter_y : bool, default='False'
          Whether to jitter y coordinates.
      kwargs :
          Passed through to plt.scatter.
  
      Examples
      --------
      >>> import matplotlib.pyplot as plt
      >>> from dabl.datasets import load_ames
      >>> data = load_ames()
      >>> fig = plt.figure()
      >>> discrete_scatter(
      ...    x=data["Year Built"],
      ...    y=data["SalePrice"],
      ...    c=data["Overall Qual"],
      ...    unique_c=[2, 4, 6, 8, 10],
      ...    legend=True,
      ...    alpha=0.3
      ... )
      """
      alpha = _get_scatter_alpha(alpha, x)
      s = _get_scatter_size(s, x)
      if ax is None:
          ax = plt.gca()
      if legend == "first":
          legend = ax.get_subplotspec().get_geometry()[2] == 1
      if unique_c is None:
          unique_c = c.unique() if c is not None else []
      if len(unique_c) == 0:
          ax.scatter(x, y, s=s, alpha=alpha, **kwargs)
  
      if jitter_x:
          x = x + np.random.normal(0, 0.1, size=len(x))
  
      if jitter_y:
          y = y + np.random.normal(0, 0.1, size=len(y))
  
      for i in unique_c:
          mask = c == i
          ax.scatter(
              x[mask], y[mask], label=i, s=s, alpha=alpha, **kwargs
          )
      if clip_outliers:
          x_low, x_high = _inlier_range(x)
          y_low, y_high = _inlier_range(y)
          xlims = ax.get_xlim()
          ylims = ax.get_ylim()
          ax.set_xlim(max(x_low, xlims[0]), min(x_high, xlims[1]))
          ax.set_ylim(max(y_low, ylims[0]), min(y_high, ylims[1]))
  
      if legend and c is not None:
          props = {}
          if len(unique_c) > 15:
              props["size"] = 6
          legend = ax.legend(prop=props, title=getattr(c, "name", None))
          for handle in legend.legendHandles:
              handle.set_alpha(1)
              handle.set_sizes((100,))
  
imports: from warnings import warn
  from functools import reduce
  import itertools
  import numpy
  import pandas
  import matplotlib.pyplot
  from matplotlib.axes import Axes
  from matplotlib.patches import Rectangle, Patch
  from matplotlib.ticker import EngFormatter
  from seaborn.utils import despine
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.metrics import roc_curve
  from sklearn.model_selection import cross_val_score, StratifiedShuffleSplit
  from ..preprocessing import detect_types
  from .._config import get_config
label_desc: Use image node_id 17 for calling a global function with example usage: discrete_scatter(x, y, c, unique_c, legend, clip_outliers, alpha, s, ax, jitter_x, jitter_y) without return types