--- loncom/xml/lonplot.pm 2002/02/27 22:17:06 1.52 +++ loncom/xml/lonplot.pm 2002/03/06 19:55:30 1.55 @@ -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.55 2002/03/06 19:55:30 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -144,6 +144,8 @@ A gnuplot tag can contain the fol
Allows specification of the x and y coordinate 'tics' on the axes. This is mostly used to adjust the grid lines when a grid is displayed. +If you are having trouble with your plot, please read the help +available on Plot Curve. ENDPLOTHELP my %gnuplot_defaults = @@ -450,17 +452,19 @@ sub end_gnuplot { '_'.time.'_'.$$.int(rand(1000)).'_plot.data'; ## Write the plot description to the file &write_gnuplot_file($tmpdir,$filename,$target); + $filename = &Apache::lonnet::escape($filename); ## return image tag for the plot if ($target eq 'web') { $result .= <<"ENDIMAGE"; -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') {