src/sb/Graph/Point.php
private function connectPoints()
    {
        foreach ($this->points as $point) {

            if (is_null($point->value)) {
                $last_x = $point->x;
                $last_y = $point->y;
                $last_val = $point->value;
                continue;
            }

            if (isset($last_x) && (isset($last_val) && !is_null($last_val))) {
                imageline($this->im, $last_x, $last_y, $point->x, $point->y,
                    $this->ink['line']);
            }
            $last_val = $point->value;
            $last_x = $point->x;
            $last_y = $point->y;
        }
    }
private function connectPoints()
    {
        foreach ($this->points as $point) {

            if (is_null($point->value)) {
                $last_x = $point->x;
                $last_y = $point->y;
                $last_val = $point->value;
                continue;
            }

            if (isset($last_x) && (isset($last_val) && !is_null($last_val))) {
                imageline($this->im, $last_x, $last_y, $point->x, $point->y,
                    $this->ink['line']);
            }
            $last_val = $point->value;
            $last_x = $point->x;
            $last_y = $point->y;
        }
    }
private function connectPoints ( ) { foreach ( $ this -> points as $ point ) { if ( is_null ( $ point -> value ) ) { $ last_x = $ point -> x ; $ last_y = $ point -> y ; $ last_val = $ point -> value ; continue ; } if ( isset ( $ last_x ) && ( isset ( $ last_val ) && ! is_null ( $ last_val ) ) ) { imageline ( $ this -> im , $ last_x , $ last_y , $ point -> x , $ point -> y , $ this -> ink [ 'line' ] ) ; } $ last_val = $ point -> value ; $ last_x = $ point -> x ; $ last_y = $ point -> y ; } }
Connect the points on a graph
Connect the points on a graph