class_docstr: Superimpose a function onto a plot
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
  fun : callable
      Function to evaluate.
  n : int, default=101
      Number of points at which to evaluate the function.
  xlim : tuple, default=None
      `x` limits for the range. The default depends on
      the `x` aesthetic. There is not an `x` aesthetic
      then the `xlim` must be provided.
  args : Optional[tuple[Any] | dict[str, Any]], default=None
      Arguments to pass to `fun`.
code: def __init__(self, mapping=None, data=None, **kwargs):
      if data is None:
  
          def _data_func(data: pd.DataFrame) -> pd.DataFrame:
              if data.empty:
                  data = pd.DataFrame({"group": [1]})
              return data
  
          data = _data_func
  
      super().__init__(mapping, data, **kwargs)
  
file_path: plotnine/plotnine/stats/stat_function.py
imports: from __future__ import annotations
  import typing
  import numpy
  import pandas
  from ..doctools import document
  from ..exceptions import PlotnineError
  from ..mapping.evaluation import after_stat
  from ..scales.scale_continuous import scale_continuous
  from .stat import stat
label_desc: Use image node_id 1 to create a new stat_function object from inherited base classes: stat with example: obj = stat_function(mapping, data)