cvs: pear /PECL/xmgrace/examples xmgrace.php

From: Date: Fri, 17 May 2002 03:54:34 +0000
Subject: cvs: pear /PECL/xmgrace/examples xmgrace.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3885@lists.php.net to get a copy of this message
jmcastagnetto Thu May 16 23:54:34 2002 EDT Modified files: /pear/PECL/xmgrace/examples xmgrace.php Log: Modified example not to use "bad" functions in the API Index: pear/PECL/xmgrace/examples/xmgrace.php diff -u pear/PECL/xmgrace/examples/xmgrace.php:1.1 pear/PECL/xmgrace/examples/xmgrace.php:1.2 --- pear/PECL/xmgrace/examples/xmgrace.php:1.1 Mon May 13 20:42:59 2002 +++ pear/PECL/xmgrace/examples/xmgrace.php Thu May 16 23:54:34 2002 @@ -16,7 +16,7 @@ | Author: Jesus M. Castagnetto <jmcastagnetto@php.net> | +----------------------------------------------------------------------+ - $Id: xmgrace.php,v 1.1 2002/05/14 00:42:59 jmcastagnetto Exp $ + $Id: xmgrace.php,v 1.2 2002/05/17 03:54:34 jmcastagnetto Exp $ */ // To test the xmgrace extension @@ -83,27 +83,7 @@ xmgrace_command (sprintf("g0.s1 point %d, %d", $i, $i * $i)); } xmgrace_command("print"); - xmgrace_close(); -} - -echo "Now let's use a visual output\n"; - -if (xmgrace_open_visual()) { - exec_commands($commands); - xmgrace_command("title font 1"); - xmgrace_command("title color 2"); - xmgrace_command("title \"Visual generation\""); - xmgrace_command("subtitle \"Using experimental xmgrace module for PHP\""); - xmgrace_command("timestamp on"); - /* generate some sample data */ - for ($i = 1; $i <= 100 && xmgrace_is_open(); $i++) { - xmgrace_command (sprintf("g0.s0 point %d, %d", $i, 100*$i)); - xmgrace_command (sprintf("g0.s1 point %d, %d", $i, $i * $i)); - /* Update the Grace display after every ten steps */ - if ($i % 10 == 0) - xmgrace_command ("redraw"); - } xmgrace_command ("saveall \"sample.agr\""); - xmgrace_close_pipe(); + xmgrace_close(); } ?>

« previous php.pear.cvs (#3885) next »