[LON-CAPA-cvs] cvs: loncom /xml lonplot.pm

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 25 Apr 2002 17:30:22 -0000


matthew		Thu Apr 25 13:30:22 2002 EDT

  Modified files:              
    /loncom/xml	lonplot.pm 
  Log:
  Bug fix, more changes for printing.
  
  
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.69 loncom/xml/lonplot.pm:1.70
--- loncom/xml/lonplot.pm:1.69	Thu Apr 25 13:25:36 2002
+++ loncom/xml/lonplot.pm	Thu Apr 25 13:30:22 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.69 2002/04/25 17:25:36 matthew Exp $
+# $Id: lonplot.pm,v 1.70 2002/04/25 17:30:22 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -498,7 +498,7 @@
      alt    = "$plot{'alttag'}" />
 ENDIMAGE
         } elsif ($target eq 'tex') {
-	    &Apache::lonnet::ssi("/cgi-bin/plot.gif?file=$filename&output=eps");
+	    &Apache::lonnet::ssi("/cgi-bin/plot.gif?file=$filename.eps&output=eps");
 	    $result = '\\\\ \graphicspath{/home/httpd/perl/tmp/}\fbox{\includegraphics[width=9.0 cm]{'.&Apache::lonnet::unescape($filename).'.eps}} \\\\';
 	}
     } elsif ($target eq 'edit') {
@@ -1068,7 +1068,7 @@
 	    # Store data values in $datatext
 	    my $datatext = '';
 	    #   get new filename
-	    my $datafilename = "$tmpdir/$filename.$i";
+	    my $datafilename = "$tmpdir/$filename.data.$i";
 	    my $fh=Apache::File->new(">$datafilename");
 	    # Compile data
 	    my @Data = @{$curve->{'data'}};
@@ -1099,7 +1099,7 @@
 	}
     }
     # Write the output to a file.
-    my $fh=Apache::File->new(">$tmpdir$filename");
+    my $fh=Apache::File->new(">$tmpdir$filename.data");
     print $fh $gnuplot_input;
     close($fh);
     # That's all folks.