version 1.107, 2005/05/16 21:58:41
|
version 1.109, 2005/06/07 22:30:42
|
Line 39 use Apache::lonnet;
|
Line 39 use Apache::lonnet;
|
|
|
use vars qw/$weboutputformat $versionstring/; |
use vars qw/$weboutputformat $versionstring/; |
|
|
|
|
|
|
BEGIN { |
BEGIN { |
&Apache::lonxml::register('Apache::lonplot',('gnuplot')); |
&Apache::lonxml::register('Apache::lonplot',('gnuplot')); |
# |
# |
Line 48 BEGIN {
|
Line 50 BEGIN {
|
if ($versionstring =~ /^gnuplot 4/) { |
if ($versionstring =~ /^gnuplot 4/) { |
$weboutputformat = 'png'; |
$weboutputformat = 'png'; |
} |
} |
|
|
} |
} |
|
|
|
|
## |
## |
## Description of data structures: |
## Description of data structures: |
## |
## |
Line 535 ENDIMAGE
|
Line 539 ENDIMAGE
|
&Apache::lonxml::debug(" gnuplot ht = $Apache::lonplot::plot{'height'}"); |
&Apache::lonxml::debug(" gnuplot ht = $Apache::lonplot::plot{'height'}"); |
#might be inside the safe space, register the URL for later |
#might be inside the safe space, register the URL for later |
&Apache::lonxml::register_ssi("/cgi-bin/plot.gif?file=$filename.data&output=eps"); |
&Apache::lonxml::register_ssi("/cgi-bin/plot.gif?file=$filename.data&output=eps"); |
$result = '\graphicspath{{/home/httpd/perl/tmp/}}\includegraphics[width='.$Apache::lonplot::plot{'texwidth'}.' mm]{'.&Apache::lonnet::unescape($filename).'.eps}'; |
$result = "%DYNAMICIMAGE:$Apache::lonplot::plot{'width'}:$Apache::lonplot::plot{'height'}:$Apache::lonplot::plot{'texwidth'} \n"; |
|
$result .= '\graphicspath{{/home/httpd/perl/tmp/}}'."\n"; |
|
$result .= '\includegraphics[width='.$Apache::lonplot::plot{'texwidth'}.' mm]{'.&Apache::lonnet::unescape($filename).'.eps}'; |
} |
} |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result.=&Apache::edit::tag_end($target,$token); |
$result.=&Apache::edit::tag_end($target,$token); |