class_docstr: Lines specified by slope and intercept
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
class_docstr_tok: ["Lines","specified","by","slope","and","intercept","{","usage","}","Parameters","--","--","--","--","--","{","common_parameters","}"]
code: def __init__(
      self,
      mapping: Aes | None = None,
      data: DataLike | None = None,
      **kwargs: Any,
  ):
      data, mapping = order_as_data_mapping(data, mapping)
      slope = kwargs.pop("slope", None)
      intercept = kwargs.pop("intercept", None)
  
      # If nothing is set, it defaults to y=x
      if mapping is None and slope is None and intercept is None:
          slope = 1
          intercept = 0
  
      if slope is not None or intercept is not None:
          if mapping:
              warn(
                  "The 'intercept' and 'slope' when specified override "
                  "the aes() mapping.",
                  PlotnineWarning,
              )
  
          if isinstance(data, Sized) and len(data):
              warn(
                  "The 'intercept' and 'slope' when specified override "
                  "the data",
                  PlotnineWarning,
              )
  
          if slope is None:
              slope = 1
          if intercept is None:
              intercept = 0
  
          data = pd.DataFrame(
              {"intercept": np.repeat(intercept, 1), "slope": slope}
          )
  
          mapping = aes(intercept="intercept", slope="slope")
          kwargs["show_legend"] = False
  
      geom.__init__(self, mapping, data, **kwargs)
  
file_path: plotnine/plotnine/geoms/geom_abline.py
imports: from __future__ import annotations
  import typing
  from typing import Sized
  from warnings import warn
  import numpy
  import pandas
  from .._utils import order_as_data_mapping
  from ..doctools import document
  from ..exceptions import PlotnineWarning
  from ..mapping import aes
  from .geom import geom
  from .geom_path import geom_path
  from .geom_segment import geom_segment
label_desc: Use image node_id 1 to create a new geom_abline object from inherited base classes: geom with example: obj = geom_abline(mapping, data)