class_docstr: Draw a line based on its slope and y-intercept. Additional arguments are
  passed to the <matplotlib.lines.Line2D> constructor.
class_docstr_tok: ["Draw","a","line","based","on","its","slope","and","y-intercept",".","Additional","arguments","are","passed","to","the","<","matplotlib.lines.Line2D",">","constructor","."]
code: def __init__(self, slope, intercept, *args, **kwargs):
      ax = kwargs["axes"]
  
      # init the line, add it to the axes
      super().__init__([], [], *args, **kwargs)
      self._slope = slope
      self._intercept = intercept
      ax.add_line(self)
  
      # cache the renderer, draw the line for the first time
      ax.figure.canvas.draw()
      self._update_lim(None)
  
      # connect to axis callbacks
      self.axes.callbacks.connect("xlim_changed", self._update_lim)
      self.axes.callbacks.connect("ylim_changed", self._update_lim)
  
imports: import matplotlib
  import numpy
  import pandas
  import param
  from matplotlib import patches
  from matplotlib.lines import Line2D
  from ...core.options import abbreviated_exception
  from ...core.util import match_spec
  from ...element import HLines, HSpans, VLines, VSpans
  from .element import ColorbarPlot, ElementPlot
  from .plot import mpl_rc_context
label_desc: Use image node_id 1 to create a new ABLine2D object from inherited base classes: Line2D with example: obj = ABLine2D(slope, intercept)