PHP Classes

File: src/usage2.php

Recommend this page to a friend!
  Classes of Win Aung Cho   PHP Plot Chart   src/usage2.php   Download  
File: src/usage2.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Plot Chart
Generate chart image from a list of data points
Author: By
Last change: Update of src/usage2.php
Date: 1 year ago
Size: 367 bytes
 

Contents

Class file image Download
<?php
include("plotChart.php");
   
$f = [];
    for (
$i = 0;$i < 40;$i++)
    {
       
$A = 10;
       
$B = 400000;
       
$f[u][$i][0] = $A*$i;
       
$f[u][$i][1] = $B * sin($A*$i * 3.1415 / 180.0);
    }
    echo
"<h1>Usage 2</h1>";
   
$plotchart = new PlotChart();
   
$plotchart->fitGraph($f);
   
$plotchart->plotGraph($f);
   
$plotchart->viewImage();
   
?>