code: def _CalculateYLines(self, dists):
      
      tot_dist = sum(dists)
      if tot_dist > 0:
        pixel_dist = [float(d * (self._gheight-20))/tot_dist for d in dists]
        pixel_grid = [0]+[int(pd + sum(pixel_dist[0:i])) for i,pd in
                          enumerate(pixel_dist)]
      else:
        pixel_grid = []
  
      return pixel_grid
docs: Builds a list with y-coordinates for the horizontal lines in the graph.
  
      Args:
        # One integer for each pair of stations
        # indicating the approximate distance
        dists: [0,33,140, ... ,X]
  
      Returns:
        # One integer y-coordinate for each station normalized between
        # 0 and X, where X is the height of the graph in pixels
        [0, 33, 140, ... , X]