--- loncom/xml/lonplot.pm	2002/02/27 22:17:06	1.52
+++ loncom/xml/lonplot.pm	2002/02/28 21:04:10	1.53
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.52 2002/02/27 22:17:06 matthew Exp $
+# $Id: lonplot.pm,v 1.53 2002/02/28 21:04:10 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -453,14 +453,15 @@ sub end_gnuplot {
 	## return image tag for the plot
 	if ($target eq 'web') {
 	    $result .= <<"ENDIMAGE";
-<img src    = "/cgi-bin/plot.gif?$filename" 
+<img src    = "/cgi-bin/plot.gif?file=$filename&output=gif" 
      width  = "$plot{'width'}" 
      height = "$plot{'height'}"
      align  = "$plot{'align'}"
      alt    = "image should be /cgi-bin/plot.gif?$filename" />
 ENDIMAGE
         } elsif ($target eq 'tex') {
-	    system "gnuplot $filename";
+	    &Apache::lonnet::ssi('cgi-bin/plot.gif?file=$filename'.
+				 '&output=eps');
 	    $result = "$filename.eps";
 	}
     } elsif ($target eq 'edit') {