Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php // content="text/plain; charset=utf-8"
  2. require_once ('jpgraph/jpgraph.php');
  3. require_once ('jpgraph/jpgraph_line.php');
  4.  
  5. // Some data
  6. $ydata = array(11,3,8,12,5,1,9,13,5,7);
  7.  
  8. // Create the graph. These two calls are always required
  9. $graph = new Graph(350,250);
  10. $graph->SetScale('textlin');
  11. $graph->SetColor('red'); # <---- this does nothing
  12. // Create the linear plot
  13. $lineplot=new LinePlot($ydata);
  14. $lineplot->SetColor('blue');
  15.  
  16. // Add the plot to the graph
  17. $graph->Add($lineplot);
  18.  
  19. // Display the graph
  20.  
  21. $graph->Stroke();
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement