コード例 #1
0
ファイル: date.php プロジェクト: gregwar/gnuplot
<?php

include '../GnuPlot.php';
use Gregwar\GnuPlot\GnuPlot;
$plot = new GnuPlot();
$plot->setXLabel('Date')->setYRange(-1, 7)->setXTimeFormat('%d/%m/%Y')->enableHistogram()->setYLabel('Y')->push('10/07/1989', 0)->push('11/07/1989', 1)->push('12/07/1989', 3)->push('13/07/1989', 3)->push('14/07/1989', 2)->push('15/07/1989', 6)->push('16/07/1989', 3)->push('17/07/1989', 2)->setTitle(0, 'The curve')->setWidth(400)->setHeight(300)->writePng('date.png');
コード例 #2
0
ファイル: out.php プロジェクト: gregwar/gnuplot
<?php

include '../GnuPlot.php';
use Gregwar\GnuPlot\GnuPlot;
$plot = new GnuPlot();
header('Content-type: image/png');
echo $plot->setGraphTitle('Demo graph')->setXLabel('Something')->setYLabel('Another something')->setWidth(500)->setHeight(300)->push(0, 1)->push(1, 10)->push(2, 3)->push(3, 2.6)->push(4, 5.3)->setTitle(0, 'Demo')->get();
コード例 #3
0
ファイル: realTime.php プロジェクト: gregwar/gnuplot
<?php

include '../GnuPlot.php';
use Gregwar\GnuPlot\GnuPlot;
$alpha = 0;
$plot = new GnuPlot();
while (true) {
    usleep(50000);
    $plot->reset();
    $plot->setGraphTitle('The magic sinuses');
    $plot->setTitle(0, 'The moving sinus');
    $plot->setTitle(1, 'The moving cosinus');
    for ($x = 0; $x < 10; $x += 0.01) {
        $plot->push($x, sin($alpha + $x));
        $plot->push($x, cos($alpha * 1.5 + $x), 1);
    }
    $alpha += 0.1;
    $plot->refresh();
}
sleep(1000);
コード例 #4
0
ファイル: eps.php プロジェクト: gregwar/gnuplot
<?php

include '../GnuPlot.php';
use Gregwar\GnuPlot\GnuPlot;
$plot = new GnuPlot();
$plot->setGraphTitle('Demo graph')->setXLabel('Something')->setYLabel('Another something')->setUnit(GnuPlot::UNIT_INCH)->setWidth(11.02)->setHeight(8.27)->setTitle(0, 'Demo')->push(0, 1)->push(1, 10)->push(2, 3)->push(3, 2.6)->push(4, 5.3)->setTitle(1, 'Other curve')->push(0, 3.9, 1)->push(1, 2.3, 1)->push(2, 4.3, 1)->push(3, 3.1, 1)->push(4, 5.2, 1)->addLabel(2, 4.3, 'An important point')->writeEPS('out.eps');
コード例 #5
0
ファイル: demo.php プロジェクト: gregwar/gnuplot
<?php

include '../GnuPlot.php';
use Gregwar\GnuPlot\GnuPlot;
$plot = new GnuPlot();
$plot->setXLabel('X')->setYRange(0, 20)->setYLabel('Y')->push(0, 1)->push(1, 10)->push(2, 3)->addLabel(2, 3, 'This is a good point')->push(3, 2.6)->push(4, 5.3)->setTitle(0, 'The curve')->display();
sleep(1000);
コード例 #6
0
ファイル: write.php プロジェクト: gregwar/gnuplot
<?php

include '../GnuPlot.php';
use Gregwar\GnuPlot\GnuPlot;
$plot = new GnuPlot();
$plot->setGraphTitle('Demo graph')->setXLabel('Something')->setYLabel('Another something')->setWidth(500)->setHeight(300)->setTitle(0, 'Demo')->push(0, 1)->push(1, 10)->push(2, 3)->push(3, 2.6)->push(4, 5.3)->setTitle(1, 'Other curve')->push(0, 3.9, 1)->push(1, 2.3, 1)->push(2, 4.3, 1)->push(3, 3.1, 1)->push(4, 5.2, 1)->addLabel(2, 4.3, 'An important point')->writePng('out.png');