code: def _pandas_compute_scatter_plot(
      data, mode, sample, threshold, **kwargs
  ) -> ScatterWidget:
      """Compute scatter plot.
  
      Args:
          data: A Pandas data frame
          mode: {'diagnostic', 'matrix', 'all'} The visualization mode.
              **diagnostic**: Plots selected by scagnostics (scatter plot diagnostics)
              **matrix**: Generate the full scatter plot matrix
              **all**: Generate all individual scatter plots
          sample: The sampling method to use. Currently not used.
          threshold: The scatter plot diagnostic threshold value [0,1] for returning a
              plot. Only used with "diagnostic" mode. For example, ``{"Outlying": 0.9}``
              returns plots with outlier metrics above 0.9. See
              ``pyscagnostics.measure_names`` for a list of metrics.
              **If a number**: Returns all plots where at least one metric is above this threshold
              **If a dictionary**: Returns plots where the metric is above its threshold.
          **kwargs: Passed to the visualization framework
  
      Returns:
          ScatterWidget
      """
      num_data = data.select_dtypes(["number"])
      if mode == "diagnostic":
          diagnostics = _get_scagnostics(num_data)
          return ScatterWidget(
              input_data=data,
              num_data=num_data,
              mode=mode,
              sample=sample,
              diagnostics=diagnostics,
              threshold=threshold,
              **kwargs,
          )
      else:
          return ScatterWidget(
              input_data=data,
              num_data=num_data,
              mode=mode,
              sample=sample,
              **kwargs,
          )
  
file_path: data-describe/data_describe/core/scatter.py
imports: from itertools import combinations
  import warnings
  import seaborn
  from data_describe._widget import BaseWidget
  from data_describe.config._config import get_option
  from data_describe.compat import _is_dataframe, _requires, _compat
  from data_describe.backends import _get_compute_backend, _get_viz_backend
label_desc: Use image node_id 2 for calling a global function with example usage: _pandas_compute_scatter_plot(data, mode, sample, threshold) and returns: ScatterWidget, ScatterWidget