Beispiel #1
0
 public function __construct($aDataX, $aDataY)
 {
     if (count($aDataX) !== count($aDataY)) {
         JpGraph::Raise('LinearRegression: X and Y data array must be of equal length.');
     }
     $this->ix = $aDataX;
     $this->iy = $aDataY;
 }
Beispiel #2
0
 function AddY($aN, &$aPlot)
 {
     if ($aPlot == null) {
         JpGraphError::Raise("Graph::AddYN() You tried to add a null plot to the graph.");
     }
     if (is_array($aPlot) && count($aPlot) > 0) {
         $cl = strtolower(get_class($aPlot[0]));
     } else {
         $cl = strtolower(get_class($aPlot));
     }
     if ($cl == 'text' || $cl == 'plotline' || $cl == 'plotband') {
         JpGraph::Raise('You can only add standard plots to multiple Y-axis');
     } else {
         $this->ynplots[$aN][] =& $aPlot;
     }
 }