コード例 #1
0
ファイル: plot.php プロジェクト: nsahoo/cmssw-1
$title = "{$dataname} plot for run {$run}";
?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title><?php 
echo $title;
?>
</title>
<?php 
echo get_stylelinks();
?>
</head>

<body>

<?php 
if ($errors = input_errors()) {
    echo $errors;
} else {
    echo "<h1>{$title}</h1>";
    draw_plotselect_form();
    draw_plot();
}
?>

</body>
</html>
コード例 #2
0
ファイル: pieangle.php プロジェクト: myfarms/PHPlot
}
# Make a data array with equal-size slices:
$data = array_fill(0, $pie_slices, array('', 1));
$plot = new PHPlot(800, 600);
$plot->SetDataValues($data);
$plot->SetDataType('text-data-single');
$plot->SetPlotType('pie');
$plot->SetShading(0);
$plot->SetImageBorderType('plain');
$plot->SetPrintImage(False);
$plot->SetTitle("Pie Chart - Vary Start Angle and Direction\n" . "(CW = Clockwise, CCW = Counter-clockwise)");
# Configure pie labels: Show sector index, inside the pie, in a large font.
$plot->SetPieLabelType('index');
$plot->SetLabelScalePosition(0.25);
#   Use the default TrueType font at 36 points.
$plot->SetFontTTF('generic', '', 36);
# This font is used by the callback to label each plot:
#   Use the default TrueType font at 16 points.
$plot->SetFontTTF('x_title', '', 16);
// Use the default TTF font at 16 pts
# Draw the plot tiles:
draw_plot($plot, $base_angle + 0, 'CCW', 0, 50);
draw_plot($plot, $base_angle + 90, 'CCW', 200, 50);
draw_plot($plot, $base_angle + 180, 'CCW', 400, 50);
draw_plot($plot, $base_angle + 270, 'CCW', 600, 50);
draw_plot($plot, $base_angle + 0, 'CW', 0, 300);
draw_plot($plot, $base_angle + 90, 'CW', 200, 300);
draw_plot($plot, $base_angle + 180, 'CW', 400, 300);
draw_plot($plot, $base_angle + 270, 'CW', 600, 300);
# Done:
$plot->PrintImage();