\n" . " $(function() {\n"; // ===== NRC ================================== $string = " $('#nrc_chart').highcharts({\n" . " chart: {\n" . " zoomType: 'xy'\n" . " },\n" . " title: {\n" . " text: '" . "Simulated Yield vs " . $type_string . " - No Radiative Corrections'\n" . " },\n" . " xAxis: [{\n" . " categories: ["; foreach($plot_x as $value) $string .= $value . ","; $string = substr($string,0,-1); $string .= "],\n" . " title: {\n" . " text: '" . $type . " " . $unit_string . "',\n" . " style: {\n" . " color: '#000000',\n" . " textAlign: 'right'\n" . " }\n" . " }\n" . " }],\n" . " yAxis: [{ \n" . " labels: { formatter: function() { return (this.value).toPrecision(3); }, style: { color: '#000000' } },\n" . " title: {\n" . " text: 'Yield',\n" . " style: {\n" . " color: '#000000'\n" . " }\n" . " }\n" . " }],\n" . " tooltip: {\n" . " shared: true\n" . " },\n" . " series: [\n"; foreach($model as $m => $v) { $string .= " {\n" . " name: '" . $model_array[$m] . "',\n" . " color: '" . $color_array[$m] . "',\n" . " step: 'center',\n" . " marker: {\n" . " enabled: false\n" . " },\n" . " data: ["; foreach($nrc_yield[$m] as $value) $string .= $value . ","; $string = substr($string,0,-1); $string .= "],\n" . " tooltip: {\n" . " pointFormat: '{series.name}: {point.y:.4f}'\n" . " }\n" . " },\n"; if($error == 0) { $string .= " { \n" . " name: '" . $model_array[$m] . " error',\n" . " type: 'errorbar',\n" . " data: ["; foreach($nrc_error[$m] as $i => $value) $string .= "[" . ($nrc_yield[$m][$i]-sqrt($nrc_error[$m][$i])) . "," . ($nrc_yield[$m][$i]+sqrt($nrc_error[$m][$i])) . "],"; $string = substr($string,0,-1); $string .= "],\n" . " tooltip: {\n" . " pointFormat: ' (error range: {point.low:.4f}-{point.high:.4f})
'\n" . " }\n" . " },\n"; } } $string = substr($string,0,-2); $string .= " ]});\n"; echo $string; // ===== RC =================================== $string = " $('#rc_chart').highcharts({\n" . " chart: {\n" . " zoomType: 'xy'\n" . " },\n" . " title: {\n" . " text: '" . "Simulated Yield vs " . $type_string . " - Radiative Corrections'\n" . " },\n" . " xAxis: [{\n" . " categories: ["; foreach($plot_x as $value) $string .= $value . ","; $string = substr($string,0,-1); $string .= "],\n" . " title: {\n" . " text: '" . $type . " " . $unit_string . "',\n" . " style: {\n" . " color: '#000000',\n" . " textAlign: 'right'\n" . " }\n" . " }\n" . " }],\n" . " yAxis: [{ \n" . " labels: { formatter: function() { return (this.value).toPrecision(3); }, style: { color: '#000000' } },\n" . " title: {\n" . " text: 'Yield',\n" . " style: {\n" . " color: '#000000'\n" . " }\n" . " }\n" . " }],\n" . " tooltip: {\n" . " shared: true\n" . " },\n" . " series: [\n"; foreach($model as $m => $v) { $string .= " {\n" . " name: '" . $model_array[$m] . "',\n" . " color: '" . $color_array[$m] . "',\n" . " step: 'center',\n" . " marker: {\n" . " enabled: false\n" . " },\n" . " data: ["; foreach($rc_yield[$m] as $value) $string .= $value . ","; $string = substr($string,0,-1); $string .= "],\n" . " tooltip: {\n" . " pointFormat: '{series.name}: {point.y:.4f}'\n" . " }\n" . " },\n"; if($error == 0) { $string .= " { \n" . " name: '" . $model_array[$m] . " error',\n" . " type: 'errorbar',\n" . " data: ["; foreach($rc_error[$m] as $i => $value) $string .= "[" . ($rc_yield[$m][$i]-sqrt($rc_error[$m][$i])) . "," . ($rc_yield[$m][$i]+sqrt($rc_error[$m][$i])) . "],"; $string = substr($string,0,-1); $string .= "],\n" . " tooltip: {\n" . " pointFormat: ' (error range: {point.low:.4f}-{point.high:.4f})
'\n" . " }\n" . " },\n"; } } $string = substr($string,0,-2); $string .= " ]});\n"; echo $string; // ===== RATIO ================================ $string = " $('#ratio_chart').highcharts({\n" . " chart: {\n" . " zoomType: 'xy'\n" . " },\n" . " title: {\n" . " text: '" . "Radiative Correction Factor vs " . $type_string . "'\n" . " },\n" . " xAxis: [{\n" . " categories: ["; foreach($plot_x as $value) $string .= $value . ","; $string = substr($string,0,-1); $string .= "],\n" . " title: {\n" . " text: '" . $type . " " . $unit_string . "',\n" . " style: {\n" . " color: '#000000',\n" . " textAlign: 'right'\n" . " }\n" . " }\n" . " }],\n" . " yAxis: [{ \n" . " labels: { formatter: function() { return (this.value).toPrecision(3); }, style: { color: '#000000' } },\n" . " title: {\n" . " text: 'Yield',\n" . " style: {\n" . " color: '#000000'\n" . " }\n" . " }\n" . " }],\n" . " tooltip: {\n" . " shared: true\n" . " },\n" . " series: [\n"; foreach($model as $m => $v) { $string .= " {\n" . " name: '" . $model_array[$m] . "',\n" . " color: '" . $color_array[$m] . "',\n" . " step: 'center',\n" . " marker: {\n" . " enabled: false\n" . " },\n" . " data: ["; foreach($ratio_yield[$m] as $value) $string .= $value . ","; $string = substr($string,0,-1); $string .= "],\n" . " tooltip: {\n" . " pointFormat: '{series.name}: {point.y:.4f}'\n" . " }\n" . " },\n"; if($error == 0) { $string .= " { \n" . " name: '" . $model_array[$m] . " error',\n" . " type: 'errorbar',\n" . " data: ["; foreach($ratio_error[$m] as $i => $value) $string .= "[" . $ratio_yield[$m][$i]*(1-$ratio_error[$m][$i]) . "," . $ratio_yield[$m][$i]*(1+$ratio_error[$m][$i]) . "],"; $string = substr($string,0,-1); $string .= "],\n" . " tooltip: {\n" . " pointFormat: ' (error range: {point.low:.4f}-{point.high:.4f})
'\n" . " }\n" . " },\n"; } } $string = substr($string,0,-2); $string .= " ]});\n"; echo $string; // ===== END ================================== echo " });\n" . " \n"; ?>
Plot Variable

' . "\n"; echo ' ' . "\n"; if($type != "Model") { echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo '
Model
MAIDDMT
Sato-LeeSAID

' . "\n"; } if($type != "Kinematic") { echo ' ' . "\n"; echo' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo '
Kinematic
123
567
8 (4")8 (15")
91011
121314

' . "\n"; } if($type != "W") { echo '
W (GeV)
to

' . "\n"; } if($type != "Q2") { echo '
Q2 (GeV/c)2
to

' . "\n"; } if($type != "Theta") { echo '
θpq* (degrees)
to

' . "\n"; } if($type == "W") echo '
W Bin Width
(minimum: 0.001 GeV)

' . "\n"; if($type == "Q2") echo '
Q2 Bin Width
(minimum: 0.001 (GeV/c)2

' . "\n"; if($type == "Theta") echo '
θ*pq Bin Width
(minimum: 1°)

' . "\n"; echo '
Don\'t Show Error Bars

' . "\n"; echo '
' . "\n"; ?>