Esempio n. 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;
 }
Esempio n. 2
0
 function AddY($aN, $aPlot)
 {
     if ($aPlot == null) {
         JpGraphError::RaiseL(25012);
         //("Graph::AddYN() You tried to add a null plot to the graph.");
     }
     if (is_array($aPlot) && count($aPlot) > 0) {
         $cl = $aPlot[0];
     } else {
         $cl = $aPlot;
     }
     if ($cl instanceof Text || class_exists('PlotLine', false) && $cl instanceof PlotLine || class_exists('PlotBand', false) && $cl instanceof PlotBand) {
         JpGraph::RaiseL(25013);
         //('You can only add standard plots to multiple Y-axis');
     } else {
         $this->ynplots[$aN][] = $aPlot;
     }
     if ($this->graph_theme) {
         $this->graph_theme->SetupPlot($aPlot);
     }
 }
Esempio n. 3
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;
     }
 }
Esempio n. 4
0
 function AddY($aN, $aPlot)
 {
     if ($aPlot == null) {
         JpGraphError::RaiseL(25012);
     }
     //("Graph::AddYN() You tried to add a null plot to the graph.");
     if (is_array($aPlot) && count($aPlot) > 0) {
         $cl = $aPlot[0];
     } else {
         $cl = $aPlot;
     }
     if ($cl instanceof Text || $cl instanceof PlotLine || class_exists('PlotBand', false) && $cl instanceof PlotBand) {
         JpGraph::RaiseL(25013);
     } else {
         $this->ynplots[$aN][] = $aPlot;
     }
 }
Esempio n. 5
0
 function AddY($aN, &$aPlot)
 {
     if ($aPlot == null) {
         JpGraphError::RaiseL(25012);
     }
     //("Graph::AddYN() You tried to add a null plot to the graph.");
     if (is_array($aPlot) && count($aPlot) > 0) {
         $cl = $aPlot[0];
     } else {
         $cl = $aPlot;
     }
     if (is_a($cl, 'Text') || is_a($cl, 'PlotLine') || is_a($cl, 'PlotBand')) {
         JpGraph::RaiseL(25013);
     } else {
         $this->ynplots[$aN][] =& $aPlot;
     }
 }
Esempio n. 6
0
 function AddY($aN, &$aPlot)
 {
     if ($aPlot == null) {
         JpGraphError::RaiseL(25012);
     }
     if (is_array($aPlot) && count($aPlot) > 0) {
         $cl = $aPlot[0];
     } else {
         $cl = $aPlot;
     }
     if (is_a($cl, 'Text') || is_a($cl, 'PlotLine') || is_a($cl, 'PlotBand')) {
         JpGraph::RaiseL(25013);
     } else {
         $this->ynplots[$aN][] =& $aPlot;
     }
 }