Pop\Graph\Graph::setAxisOptions PHP Method

setAxisOptions() public method

Set the axis options
public setAxisOptions ( Pop\Color\Space\ColorInterface $color = null, integer $width = 2 ) : Graph
$color Pop\Color\Space\ColorInterface
$width integer
return Graph
    public function setAxisOptions(ColorInterface $color = null, $width = 2)
    {
        $this->axisColor = null === $color ? new Rgb(0, 0, 0) : $color;
        $this->axisWidth = (int) $width;
        return $this;
    }

Usage Example

Example #1
0
 public function testSetAxisOptions()
 {
     $g = new Graph($this->imageOptions);
     $g->setAxisOptions(new Rgb(128, 128, 128), 5);
     $this->assertEquals(new Rgb(128, 128, 128), $g->getAxisColor());
     $this->assertEquals(5, $g->getAxisWidth());
 }