class_docstr: Line graph class
class_docstr_tok: ["Line","graph","class"]
docstr: Compute y min and max and y scale and set labels
docstr_tok: ["Compute","y","min","and","max","and","y","scale","and","set","labels"]
code: def _compute(self):
      """Compute y min and max and y scale and set labels"""
      # X Labels
      if self.horizontal:
          self._x_pos = (
              [x / (self._len - 1) for x in range(self._len)][::-1]
              if self._len != 1
              else [0.5]
          )  # Center if only one value
      else:
          self._x_pos = (
              [x / (self._len - 1) for x in range(self._len)]
              if self._len != 1
              else [0.5]
          )  # Center if only one value
  
      self._points(self._x_pos)
  
      if self.include_x_axis:
          # Y Label
          self._box.ymin = min(self._min or 0, 0)
          self._box.ymax = max(self._max or 0, 0)
      else:
          self._box.ymin = self._min
          self._box.ymax = self._max
  
file_path: pygal/pygal/graph/line.py
imports: from pygal.graph.graph import Graph
  from pygal.util import alter, cached_property, decorate
label_desc: Use image node_id 6 for calling the Line obj's underlying member method code with example usage: obj._compute() without return types