12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- //require_once('/var/www/stsstatus/phplot.php');
-
- // positions of sensors
- // z-positions of top/bottom sensors
- $position = file('data/SensorPositionsTopBottom.txt');
-
- $tempError = 0.009; // 1.5 for uncalibrated, 0.00827 for calibrated sensors
- $data = array();
- for ($ii=0; $ii<sizeof($position); $ii++) {
- $tempTop = $adeiValue[21][$ii]; $tempBottom = $adeiValue[22][$ii];
- //if ($ii==1) $tempTop=""; // 200-RTP-3-5106 looks ok now (May 2, 2018)
- //if ($ii==1 || $ii==2 || $ii==3) $tempBottom="";
- if ($ii==3) $tempBottom="";
- $data[] = array( '', $position[$ii]/1000, $tempTop, $tempError, $tempError, $tempBottom, $tempError, $tempError );
- //echo $position[$ii]/1000 ." ". $tempTop ." ". $tempBottom . "<br>";
- }
-
- $plot = new PHPlot(605, 250);
- $plot->SetImageBorderType('plain');
- $plot->SetFont('title', 5); $plot->SetFont('x_title', 4); $plot->SetFont('y_title', 4);
- $plot->SetFont('x_label', 2); $plot->SetFont('y_label', 2);
- $plot->SetDataType('data-data-error');
- $plot->SetDataValues($data);
- # Main plot title:
- $plot->SetTitle('source temperature profile');
- $plot->SetPlotType('linepoints');
- $plot->SetLineStyles(array('solid', 'dashed') );
- $plot->SetLineWidths( 2.5 );
- $colors = array('red', 'blue');
- $plot->SetDataColors( $colors );
- $plot->SetErrorBarColors( $colors );
- $plot->SetPointShapes( array('delta', 'dot') );
- $plot->SetXLabel( 'longitudinal position (m)' );
- $plot->SetYLabel( 'temperature (K)' );
- $plot->SetLegend( array('top', 'bottom') );
- $plot->SetLegendUseShapes(true);
- $plot->SetLegendPosition(1, 0, 'plot', 1, 0, 12, -23);
- $plot->TuneYAutoRange(0.7);
- # Make sure Y axis starts at 0:
- //$plot->SetPlotAreaWorld(NULL, 0, NULL, NULL);
- $plot->SetPrintImage(false);
- $plot->DrawGraph();
-
- ?>
|