Index: trunk/workflow/inc/phplot/phplot.php
===================================================================
--- trunk/workflow/inc/phplot/phplot.php	(revision 6057)
+++ trunk/workflow/inc/phplot/phplot.php	(revision 7655)
@@ -549,5 +549,5 @@
             $this->ndx_data_colors[$i] = $this->SetIndexColor($col);
             $this->ndx_data_dark_colors[$i] = $this->SetIndexDarkColor($col);
-            $i++;
+            ++$i;
         }
 
@@ -574,5 +574,5 @@
         foreach($this->data_border_colors as $col) {
             $this->ndx_data_border_colors[$i] = $this->SetIndexColor($col);
-            $i++;
+            ++$i;
         }
     } // function SetDataBorderColors()
@@ -595,5 +595,5 @@
         foreach($this->error_bar_colors as $col) {
             $this->ndx_error_bar_colors[$i] = $this->SetIndexColor($col);
-            $i++;
+            ++$i;
         }
         return TRUE;
@@ -628,5 +628,5 @@
                 $this->default_dashed_style .= str_repeat('IMG_COLOR_TRANSPARENT,', $s);
             }
-            $t++;
+            ++$t;
         }
         // Remove trailing comma and add closing parenthesis
@@ -959,5 +959,5 @@
 
                 $ypos = $which_ypos;
-                for($i = 0; $i < $nlines; $i++) {
+                for($i = 0; $i < $nlines; ++$i) {
                     // Center the text vertically around $which_ypos (each line)
                     if ($which_valign == 'center')
@@ -983,5 +983,5 @@
 
                 $xpos = $which_xpos;
-                for($i = 0; $i < $nlines; $i++) {
+                for($i = 0; $i < $nlines; ++$i) {
                     // center the text around $which_xpos
                     if ($which_halign == 'center')
@@ -1710,5 +1710,5 @@
 
         // Fix odd point sizes for point shapes which need it
-        for ($i = 0; $i < $pt; $i++) {
+        for ($i = 0; $i < $pt; ++$i) {
             if ($this->point_shapes[$i] == 'diamond' or $this->point_shapes[$i] == 'triangle') {
                 if ($this->point_sizes[$i] % 2 != 0) {
@@ -1762,5 +1762,5 @@
         $this->total_records = 0;               // Perform some useful calculations.
         $this->records_per_group = 1;
-        for ($i = 0, $recs = 0; $i < $this->num_data_rows; $i++) {
+        for ($i = 0, $recs = 0; $i < $this->num_data_rows; ++$i) {
             // Copy
             $this->data[$i] = array_values($which_dv[$i]);   // convert to numerical indices.
@@ -1842,5 +1842,5 @@
 
         // Process each row of data
-        for ($i=0; $i < $this->num_data_rows; $i++) {
+        for ($i=0; $i < $this->num_data_rows; ++$i) {
             $j=0;
             // Extract maximum text label length
@@ -1858,5 +1858,5 @@
                     $miny = $maxy;
                 }
-                for (; $j < $this->num_recs[$i]; $j++) {
+                for (; $j < $this->num_recs[$i]; ++$j) {
                     $val = (double)$this->data[$i][$j];
                     if ($this->plot_type == 'stackedbars') {
@@ -1876,5 +1876,5 @@
                 $miny = $maxy = (double)$this->data[$i][$j++];
                 // $numrecs = @ count($this->data[$i]);
-                for (; $j < $this->num_recs[$i]; $j++) {
+                for (; $j < $this->num_recs[$i]; ++$j) {
                     $val = (double)$this->data[$i][$j];
                     $maxy = ($val > $maxy) ? $val : $maxy;
@@ -3180,5 +3180,5 @@
             $y_pos += $char_h + $this->line_spacing;
 
-            $color_index++;
+            ++$color_index;
             if ($color_index > $max_color_index)
                 $color_index = 0;
@@ -3222,6 +3222,6 @@
         // Get sum of each column? One pie slice per column
         if ($this->data_type === 'text-data') {
-            for ($i = 0; $i < $this->num_data_rows; $i++) {
-                for ($j = 1; $j < $this->num_recs[$i]; $j++) {      // Label ($row[0]) unused in these pie charts
+            for ($i = 0; $i < $this->num_data_rows; ++$i) {
+                for ($j = 1; $j < $this->num_recs[$i]; ++$j) {      // Label ($row[0]) unused in these pie charts
                     @ $sumarr[$j] += abs($this->data[$i][$j]);      // NOTE!  sum > 0 to make pie charts
                 }
@@ -3230,5 +3230,5 @@
         // Or only one column per row, one pie slice per row?
         else if ($this->data_type == 'text-data-single') {
-            for ($i = 0; $i < $this->num_data_rows; $i++) {
+            for ($i = 0; $i < $this->num_data_rows; ++$i) {
                 $legend[$i] = $this->data[$i][0];                   // Set the legend to column labels
                 $sumarr[$i] = $this->data[$i][1];
@@ -3236,6 +3236,6 @@
         }
         else if ($this->data_type == 'data-data') {
-            for ($i = 0; $i < $this->num_data_rows; $i++) {
-                for ($j = 2; $j < $this->num_recs[$i]; $j++) {
+            for ($i = 0; $i < $this->num_data_rows; ++$i) {
+                for ($j = 2; $j < $this->num_recs[$i]; ++$j) {
                     @ $sumarr[$j] += abs($this->data[$i][$j]);
                 }
@@ -3304,5 +3304,5 @@
                                     $label_txt, 'center', 'center');
                 }
-                $color_index++;
+                ++$color_index;
                 $color_index = $color_index % $max_data_colors;
             }   // end for
@@ -3325,5 +3325,5 @@
         $do_labels = ($this->plot_type != 'linepoints');
 
-        for($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                // Skip record #0 (title)
 
@@ -3337,5 +3337,5 @@
 
             // Now go for Y, E+, E-
-            for ($idx = 0; $record < $this->num_recs[$row]; $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$idx) {
                     // Y:
                     $y_now = $this->data[$row][$record++];
@@ -3367,5 +3367,5 @@
         $do_labels = ($this->plot_type != 'linepoints');
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $rec = 1;                    // Skip record #0 (data label)
 
@@ -3383,5 +3383,5 @@
 
             // Proceed with Y values
-            for($idx = 0;$rec < $this->num_recs[$row]; $rec++, $idx++) {
+            for($idx = 0;$rec < $this->num_recs[$row]; ++$rec, ++$idx) {
                 if (is_numeric($this->data[$row][$rec])) {              // Allow for missing Y data
                     $this->DrawDot($x_now, $this->data[$row][$rec],
@@ -3400,5 +3400,5 @@
         $this->CheckOption($this->data_type, 'text-data, data-data', __FUNCTION__);
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $rec = 1;                    // Skip record #0 (data label)
 
@@ -3416,5 +3416,5 @@
 
             // Proceed with Y values
-            for($idx = 0;$rec < $this->num_recs[$row]; $rec++, $idx++) {
+            for($idx = 0;$rec < $this->num_recs[$row]; ++$rec, ++$idx) {
                 if (is_numeric($this->data[$row][$rec])) {              // Allow for missing Y data
                     ImageSetThickness($this->img, $this->line_widths[$idx]);
@@ -3545,5 +3545,5 @@
         $incomplete_data_defaults_to_x_axis = FALSE;        // TODO: make this configurable
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $rec = 1;                                       // Skip record #0 (data label)
 
@@ -3561,5 +3561,5 @@
             // Proceed with Y values
             // Create array of points for imagefilledpolygon()
-            for($idx = 0; $rec < $this->num_recs[$row]; $rec++, $idx++) {
+            for($idx = 0; $rec < $this->num_recs[$row]; ++$rec, ++$idx) {
                 if (is_numeric($this->data[$row][$rec])) {              // Allow for missing Y data
                     $y_now_pixels = $this->ytr($this->data[$row][$rec]);
@@ -3582,5 +3582,5 @@
 
         $end = count($posarr);
-        for ($i = 0; $i < $end; $i++) {
+        for ($i = 0; $i < $end; ++$i) {
             // Prepend initial points. X = first point's X, Y = x_axis_y_pixels
             $x = $posarr[$i][0];
@@ -3618,5 +3618,5 @@
         }
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3631,5 +3631,5 @@
                 $this->DrawXDataLabel($this->data[$row][0], $x_now_pixels, $row);
 
-            for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$record, ++$idx) {
                 if (($line_style = $this->line_styles[$idx]) == 'none')
                     continue; //Allow suppressing entire line, useful with linepoints
@@ -3679,5 +3679,5 @@
         $start_lines = array_fill(0, $this->records_per_group, FALSE);
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3691,5 +3691,5 @@
 
             // Now go for Y, E+, E-
-            for ($idx = 0; $record < $this->num_recs[$row]; $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$idx) {
                 if (($line_style = $this->line_styles[$idx]) == 'none')
                     continue; //Allow suppressing entire line, useful with linepoints
@@ -3749,5 +3749,5 @@
         }
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3763,5 +3763,5 @@
 
             // Draw Lines
-            for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$record, ++$idx) {
                 if (is_numeric($this->data[$row][$record])) {               // Allow for missing Y data
                     $y_now_pixels = $this->ytr($this->data[$row][$record]);
@@ -3813,5 +3813,5 @@
         $x_first_bar = (($this->records_per_group - 1) * $this->record_bar_width) / 2 - $this->bar_adjust_gap;
 
-        for ($row = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3825,5 +3825,5 @@
 
             // Draw the bars in the group:
-            for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$record, ++$idx) {
                 if (is_numeric($this->data[$row][$record])) {       // Allow for missing Y data
                     $x2 = $x1 + $this->actual_bar_width;
@@ -3892,5 +3892,5 @@
         $x_first_bar = $this->record_bar_width / 2 - $this->bar_adjust_gap;
 
-        for ($row = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3906,5 +3906,5 @@
             // Draw the bars
             $oldv = 0;
-            for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; $record++, ++$idx) {
                 if (is_numeric($this->data[$row][$record])) {       // Allow for missing Y data
 
