now with a legend, and multiple lines work.

llvm-svn: 22153
This commit is contained in:
Andrew Lenharth 2005-05-20 17:50:51 +00:00
parent e5dc5c9c74
commit 0abbc1336d
2 changed files with 10 additions and 6 deletions

View File

@ -27,6 +27,7 @@ $| = 1;
print "Content-type: image/png", "\n\n";
open CMDSTREAM, "|gnuplot";
#open CMDSTREAM, "|echo";
print CMDSTREAM "set terminal png\n";
print CMDSTREAM "set output\n";
@ -36,7 +37,7 @@ print CMDSTREAM "\nplot";
for ($iter = 0; $iter < $count; $iter++) {
if ($iter)
{ print CMDSTREAM ","; }
print CMDSTREAM " '-' using 1:2 with lines";
print CMDSTREAM " '-' using 1:2 title \"" . $q->param('t' . $iter) . "," . $q->param('n' . $iter) . "\"with lines";
}
print CMDSTREAM "\n";

View File

@ -61,15 +61,18 @@ else
{
my @names = $q->param('name');
my @tests = $q->param('test');
print "<P>";
print join "<BR>", @names;
print "<P>";
print join "<BR>", @tests;
print "<P>";
$str = "pwd=" . $q->param('pwd');
$count = 0;
while (@names)
foreach $n (@names)
{
$n = pop @names;
while (@tests)
foreach $t (@tests)
{
$t = pop @tests;
$str .= "&t$count=$t&n$count=$n";
$str = "$str&t$count=$t&n$count=$n";
$count++;
}
}