public function addHorizontalLine($y, $color = 'red', $label = '')
    {

        if (!array_key_exists($color, $this->ink)) {
            throw(new \Exception("Ink color must be in " . implode(",",
                    \array_keys($this->ink))));
        }

        $y = $this->plotValue($y);
        imageline($this->im, 0, $y, $this->width, $y, $this->ink[$color]);

        imagestring($this->im, 2, $this->graph_width / 2 + $this->axis_offset,
            $y, $label, $this->ink[$color]);
    }