src/PHPSci/Plot/Plotter.php
public function addRectangle($x1, $y1, $x2, $y2, $colors = [0, 0, 0])
    {
        $color = imagecolorallocate($this->image(), $colors[0],  $colors[1],  $colors[2]);
        imagerectangle ( $this->image() , $x1 , $y1 , $x2 , $y2 ,  $color );
    }
public function addRectangle($x1, $y1, $x2, $y2, $colors = [0, 0, 0])
    {
        $color = imagecolorallocate($this->image(), $colors[0],  $colors[1],  $colors[2]);
        imagerectangle ( $this->image() , $x1 , $y1 , $x2 , $y2 ,  $color );
    }
public function addRectangle ( $ x1 , $ y1 , $ x2 , $ y2 , $ colors = [ 0 , 0 , 0 ] ) { $ color = imagecolorallocate ( $ this -> image ( ) , $ colors [ 0 ] , $ colors [ 1 ] , $ colors [ 2 ] ) ; imagerectangle ( $ this -> image ( ) , $ x1 , $ y1 , $ x2 , $ y2 , $ color ) ; }
Add Rectangle to Graph
@param $x1
@param $y1
@param $x2
@param $y2
@param array $colors
Add Rectangle to Graph