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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 25 Apr 2002 17:23:10 -0000


sakharuk		Thu Apr 25 13:23:10 2002 EDT

  Modified files:              
    /loncom/xml	lonplot.pm 
  Log:
  minot cleanup for eps
  
  
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.67 loncom/xml/lonplot.pm:1.68
--- loncom/xml/lonplot.pm:1.67	Wed Apr 24 17:24:40 2002
+++ loncom/xml/lonplot.pm	Thu Apr 25 13:23:10 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.67 2002/04/24 21:24:40 matthew Exp $
+# $Id: lonplot.pm,v 1.68 2002/04/25 17:23:10 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -498,9 +498,8 @@
      alt    = "$plot{'alttag'}" />
 ENDIMAGE
         } elsif ($target eq 'tex') {
-	    &Apache::lonnet::ssi('cgi-bin/plot.gif?file=$filename'.
-				 '&output=eps');
-	    $result = "$filename.eps";
+	    &Apache::lonnet::ssi("/cgi-bin/plot.gif?file=$filename&output=eps");
+	    $result = '\\\\ \graphicspath{/home/httpd/perl/tmp/}\fbox{\includegraphics[width=9.0 cm]{'.&Apache::lonnet::unescape($filename).'.eps}} \\\\';
 	}
     } elsif ($target eq 'edit') {
 	$result.=&Apache::edit::tag_end($target,$token);
@@ -992,7 +991,8 @@
 	$gnuplot_input .= "set output\n";
     } elsif ($target eq 'tex') {
 	$gnuplot_input .= "set term postscript eps monochrome\n";
-	$gnuplot_input .= "set output \"/home/httpd/perl/tmp/$filename.eps\"\n";
+	$gnuplot_input .= "set output \"/home/httpd/perl/tmp/".
+	    &Apache::lonnet::unescape($filename).".eps\"\n";
     }
     # grid
     $gnuplot_input .= 'set grid'.$/ if ($plot{'grid'} eq 'on');