PHP Classes

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Yuriy Rusinov  >  graph2d  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: some graphs
Class: graph2d
Generates two dimensional graphic images
Author: By
Last change:
Date: 12 years ago
Size: 897 bytes


Class file image Download
require_once ('graph2d.class.php');




    for (
$i=0; $i<$n; $i++)
$yarr3[$i]=sqrt ($xarr[$i]);

$test=new graph2d ("jpeg", 700, 350, 60, 20, 20, 40);

$test->SetAxisScales ($xmin, $xmax, 0.1, 1, $ymin, $ymax, $ystep, 1);

$test->SetTitle ("Test");
$test->SetXLegend ("X");
$test->SetYLegend ("Y");


$test->Draw($xarr, $yarr1, 0xFF, 0, 0);

$test->Draw($xarr, $yarr2, 0, 0xFF, 0);

$test->Draw($xarr, $yarr3, 0, 0, 0xFF);