Exemple #1
0
<?php

// content="text/plain; charset=utf-8"
// A simple Polar graph,
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_polar.php';
$data = array(0, 1, 10, 2, 30, 25, 40, 60, 50, 110, 60, 160, 70, 210, 75, 230, 80, 260, 85, 370, 90, 480, 95, 370, 100, 260, 105, 230, 110, 210, 120, 160, 130, 110, 140, 60, 150, 25, 170, 2, 180, 1);
$graph = new PolarGraph(350, 320);
$graph->SetScale('log', 100);
$graph->SetType(POLAR_180);
// Hide frame around graph (by setting width=0)
$graph->SetFrame(true, 'white', 1);
// Show both major and minor grid lines
$graph->axis->ShowGrid(true, true);
// Set color for gradient lines
$graph->axis->SetGridColor('lightblue:0.9', 'lightblue:0.9', 'lightblue:0.9');
// Set label and axis colors
$graph->axis->SetColor('black', 'navy', 'darkred');
// Draw the ticks on the bottom side of the radius axis
$graph->axis->SetTickSide(SIDE_DOWN);
// Increase the margin for the labels since we changed the
// side of the ticks.
$graph->axis->SetLabelMargin(6);
// Change fonts
$graph->axis->SetFont(FF_ARIAL, FS_NORMAL, 8);
$graph->axis->SetAngleFont(FF_ARIAL, FS_NORMAL, 8);
// Setup axis title
$graph->axis->SetTitle('Coverage (in meter)', 'middle');
$graph->axis->title->SetFont(FF_FONT1, FS_BOLD);
// Setup graph title
$graph->title->Set('Polar plot #9');
Exemple #2
0
<?php

// content="text/plain; charset=utf-8"
// A simple Polar graph, example 0
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_polar.php';
$data = array(0, 1, 10, 2, 30, 25, 40, 60, 50, 110, 60, 160, 70, 210, 75, 230, 80, 260, 85, 270, 90, 280, 95, 270, 100, 260, 105, 230, 110, 210, 120, 160, 130, 110, 140, 60, 150, 25, 170, 2, 180, 1);
$graph = new PolarGraph(250, 250);
$graph->SetScale('lin');
$graph->SetMargin(35, 35, 25, 25);
$graph->SetType(POLAR_180);
$p = new PolarPlot($data);
$p->SetFillColor('lightblue@0.5');
$graph->Add($p);
$graph->Stroke();
Exemple #3
0
<?php

// A simple Polar graph,
include "../jpgraph.php";
include "../jpgraph_polar.php";
$data = array(0, 1, 10, 2, 30, 25, 40, 60, 50, 110, 60, 160, 70, 210, 75, 230, 80, 260, 85, 370, 90, 480, 95, 370, 100, 260, 105, 230, 110, 210, 120, 160, 130, 110, 140, 60, 150, 25, 170, 2, 180, 1);
$graph = new PolarGraph(300, 350);
$graph->SetScale('lin', 300);
$graph->SetType(POLAR_180);
$graph->SetPlotSize(220, 250);
// Hide frame around graph (by setting width=0)
$graph->SetFrame(true, 'white', 1);
$graph->SetBackgroundGradient('blue:1.3', 'brown:1.4', GRAD_HOR, BGRAD_PLOT);
// Show both major and minor grid lines
$graph->axis->ShowGrid(true, true);
// Set color for gradient lines
$graph->axis->SetGridColor('gray', 'gray', 'gray');
// Setup axis title
$graph->axis->SetTitle('Coverage (in meter)', 'middle');
$graph->axis->title->SetFont(FF_FONT1, FS_BOLD);
$graph->title->Set('Polar plot #7');
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 16);
$graph->title->SetColor('navy');
// Adjust legen box position and color
$graph->legend->SetColor('navy', 'darkgray');
$graph->legend->SetFillColor('white');
$graph->legend->SetShadow('darkgray@0.5', 5);
$p = new PolarPlot($data);
$p->SetFillColor('lightblue@0.5');
$p->mark->SetType(MARK_SQUARE);
$p->SetLegend("Mirophone #1\n(No amps)");
Exemple #4
0
<?php

// A simple Polar graph, example 2
include "../jpgraph.php";
include "../jpgraph_polar.php";
$data = array(0, 1, 10, 2, 30, 25, 40, 60, 50, 110, 60, 160, 70, 210, 75, 230, 80, 260, 85, 270, 90, 280, 95, 270, 100, 260, 105, 230, 110, 210, 120, 160, 130, 110, 140, 60, 150, 25, 170, 2, 180, 1);
$graph = new PolarGraph(300, 350);
$graph->SetScale('log');
$graph->title->Set('Polar plot #4');
$graph->title->SetFont(FF_FONT2, FS_BOLD);
$graph->title->SetColor('navy');
// Hide last labels on the Radius axis
// They intersect with the box otherwise
$graph->axis->HideLastTickLabel();
$p = new PolarPlot($data);
$p->SetFillColor('lightred@0.5');
$graph->Add($p);
$graph->Stroke();
Exemple #5
0
<?php

// content="text/plain; charset=utf-8"
// A simple Polar graph, example 1
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_polar.php';
$data = array(0, 1, 10, 2, 30, 25, 40, 60, 50, 110, 60, 160, 70, 210, 75, 230, 80, 260, 85, 270, 90, 280, 95, 270, 100, 260, 105, 230, 110, 210, 120, 160, 130, 110, 140, 60, 150, 25, 170, 2, 180, 1);
$graph = new PolarGraph(600, 500);
$graph->SetScale('lin');
$graph->SetType(POLAR_180);
//$graph->SetAngle(90);
//$graph->SetMargin(30-150,30-150,30+150,30+150);
$graph->Set90AndMargin(40, 40, 40, 40);
//$graph->axis->SetLabelAlign('right','center');
$p = new PolarPlot($data);
$p->SetLegend("Test");
$graph->Add($p);
$graph->Stroke();
Exemple #6
0
<?php

// content="text/plain; charset=utf-8"
// A simple Polar graph,
include "jpgraph/jpgraph.php";
include "jpgraph/jpgraph_polar.php";
$data = array(0, 1, 10, 2, 30, 25, 40, 60, 50, 110, 60, 160, 70, 210, 75, 230, 80, 260, 85, 270, 90, 480, 95, 270, 100, 260, 105, 230, 110, 210, 120, 160, 130, 110, 140, 60, 150, 25, 170, 2, 180, 1);
$graph = new PolarGraph(300, 350);
$graph->SetScale('log');
$graph->SetType(POLAR_180);
// Show both major and minor grid lines
$graph->axis->ShowGrid(true, true);
$graph->title->Set('Polar plot #6');
$graph->title->SetFont(FF_FONT2, FS_BOLD);
$graph->title->SetColor('navy');
$p = new PolarPlot($data);
$p->SetFillColor('lightred@0.5');
$graph->Add($p);
$graph->Stroke();
Exemple #7
0
<?php

// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_polar.php';
//$data = array(22,12,27,40,80,48,120,40,142,27,170,12);
$data = array(0, 0, 10, 2, 30, 25, 40, 60, 50, 110, 60, 140, 70, 170, 80, 190, 85, 195, 90, 200, 95, 195, 100, 190, 110, 170, 120, 140, 130, 110, 140, 60, 150, 25, 170, 2, 180, 0);
//$data2 = array(0,0,50,2,60,30,65,90,60,120,50,150,20,170,0,180);
$data2 = array(0, 0, 34, 56, 90, 90, 170, 65, 220, 90, 270, 120, 300, 60, 355, 10);
$graph = new PolarGraph(350, 350);
$graph->SetScale('lin', 150);
$graph->SetMarginColor('#FFE6C0');
$graph->SetType(POLAR_360);
$graph->SetMargin(40, 40, 50, 40);
$graph->SetClockwise(true);
//$graph->Set90AndMargin(60,50,70,120);
$graph->SetBox(true);
$graph->SetFrame(false);
$graph->axis->ShowGrid(true, false, true);
$graph->axis->SetGridColor('gray', 'gray', 'gray');
$graph->axis->SetFont(FF_ARIAL, FS_NORMAL, 8);
$graph->axis->SetTitle('X-Axis', 'center');
$graph->axis->SetColor('black', 'black', 'darkred');
$graph->axis->SetAngleFont(FF_ARIAL, FS_NORMAL, 8);
$graph->title->Set('Clockwise polar plot');
$graph->title->SetFont(FF_COMIC, FS_NORMAL, 16);
$graph->title->SetColor('navy');
$p = new PolarPlot($data);
$p->SetFillColor('lightblue@0.5');
$graph->Add($p);
//$p2 = new PolarPlot($data2);
<?php

// content="text/plain; charset=utf-8"
// A simple Polar graph, example 2
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_polar.php';
$data = array(0, 1, 10, 2, 30, 25, 40, 60, 50, 110, 60, 160, 70, 210, 75, 230, 80, 260, 85, 270, 90, 280, 95, 270, 100, 260, 105, 230, 110, 210, 120, 160, 130, 110, 140, 60, 150, 25, 170, 2, 180, 1);
$graph = new PolarGraph(300, 300);
$graph->SetScale('lin', 200);
$graph->SetType(POLAR_180);
$graph->title->Set('Polar plot #3');
$graph->title->SetFont(FF_FONT2, FS_BOLD);
$graph->title->SetColor('navy');
$graph->axis->ShowGrid(true, false);
$p = new PolarPlot($data);
$p->SetFillColor('lightred@0.5');
$graph->Add($p);
$graph->Stroke();
Exemple #9
0
<?php

// content="text/plain; charset=utf-8"
// A simple Polar graph, example 0
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_polar.php';
$data = array(0, 1, 10, 2, 30, 25, 40, 60, 50, 110, 60, 160, 70, 210, 75, 230, 80, 260, 85, 270, 90, 280, 95, 270, 100, 260, 105, 230, 110, 210, 120, 160, 130, 110, 140, 60, 150, 25, 170, 2, 180, 1);
$graph = new PolarGraph(250, 250);
$graph->SetScale('lin');
$graph->SetMargin(35, 35, 25, 25);
$p = new PolarPlot($data);
$p->SetFillColor('lightblue@0.5');
$graph->Add($p);
$graph->Stroke();
Exemple #10
0
 function create_image()
 {
     include './lib/jpgraph/jpgraph.php';
     include './lib/jpgraph/jpgraph_polar.php';
     $graph = new PolarGraph(250, 250);
     $graph->SetScale('lin');
     $graph->SetMargin(0, 1, 0, 1);
     $graph->axis->ShowAngleLabel(false);
     $graph->axis->HideTicks();
     $graph->axis->HideLabels();
     $graph->axis->HideLine();
     $fonts = array(FF_ARIAL, FF_VERDANA, FF_TREBUCHE, FF_GEORGIA, FF_COMIC, FF_COURIER, FF_TIMES);
     $styles = array(FS_NORMAL, FS_BOLD, FS_ITALIC);
     $text = $this->generate_pass(6);
     $font = $fonts[rand(0, count($fonts) - 1)];
     $style = $styles[rand(0, count($styles) - 1)];
     if ($font == FF_COMIC && $style == FS_ITALIC) {
         $style = FS_NORMAL;
     }
     $txt = new Text($text);
     $txt->Pos(rand(10, 140), rand(10, 140));
     $txt->SetFont($font, $style, rand(20, 26));
     $txt->SetColor('black');
     $txt->SetAngle(rand(-45, 45));
     $graph->AddText($txt);
     $graph->Stroke('./register.png');
     return array(md5("{$this->sets['db_pass']}{$this->sets['mostonlinetime']}{$text}"), './register.png');
 }
 function create_image()
 {
     include './lib/jpgraph/jpgraph.php';
     include './lib/jpgraph/jpgraph_polar.php';
     if (!function_exists('imagejpeg')) {
         JpGraphError::Raise("This PHP installation is not configured with JPEG support meaning that anti-robot registration cannnot be run at this current time. Please recompile PHP with GD and JPEG support to run JpGraph and that will allow anti-robot registration to fully function. (Function imagejpeg() does not exist)");
     }
     $graph = new PolarGraph(250, 250);
     $graph->SetScale('lin');
     $graph->SetMargin(0, 1, 0, 1);
     $graph->axis->ShowAngleLabel(false);
     $graph->axis->HideTicks();
     $graph->axis->HideLabels();
     $graph->axis->HideLine();
     $fonts = array(FF_ARIAL, FF_VERDANA, FF_TREBUCHE, FF_GEORGIA, FF_COMIC, FF_COURIER, FF_TIMES);
     $styles = array(FS_NORMAL, FS_BOLD, FS_ITALIC);
     $text = $this->generate_pass(6);
     $font = $fonts[rand(0, count($fonts) - 1)];
     $style = $styles[rand(0, count($styles) - 1)];
     if ($font == FF_COMIC && $style == FS_ITALIC) {
         $style = FS_NORMAL;
     }
     $txt = new Text($text);
     $txt->Pos(rand(10, 140), rand(10, 140));
     $txt->SetFont($font, $style, rand(20, 26));
     $txt->SetColor('black');
     $txt->SetAngle(rand(-45, 45));
     $graph->AddText($txt);
     $graph->Stroke('./register.png');
     return array(md5("{$this->sets['db_pass']}{$this->sets['mostonlinetime']}{$text}"), './register.png');
 }