now with a legend, and multiple lines work.
authorAndrew Lenharth <andrewl@lenharth.org>
Fri, 20 May 2005 17:50:51 +0000 (17:50 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Fri, 20 May 2005 17:50:51 +0000 (17:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22153 91177308-0d34-0410-b5e6-96231b3b80d8

utils/cgiplotNLT.pl
utils/webNLT.pl

index d9b61d813f90ae3ef4c3f1885773bc84d1d95239..0360e4120d8cdebb9d4dcc28ea218d0aadc12046 100755 (executable)
@@ -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";
index 7f55b60187c6eab0fd74187db1e00b4e2b4aa1ea..fb29fd292e2d8f5e5310d1e5ef53387ee77ff783 100755 (executable)
@@ -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++;
               }
           }