version 1.54, 2002/03/01 14:03:50
|
version 1.56, 2002/03/14 19:02:30
|
Line 144 A <b>gnuplot</b> tag can contain the fol
|
Line 144 A <b>gnuplot</b> tag can contain the fol
|
<dd> Allows specification of the x and y coordinate 'tics' on the axes. |
<dd> 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. |
This is mostly used to adjust the grid lines when a grid is displayed. |
</dl> |
</dl> |
|
If you are having trouble with your plot, please read the help |
|
available on Plot Curve. |
ENDPLOTHELP |
ENDPLOTHELP |
|
|
my %gnuplot_defaults = |
my %gnuplot_defaults = |
Line 441 sub end_gnuplot {
|
Line 443 sub end_gnuplot {
|
&Apache::lonxml::deregister('Apache::lonplot', |
&Apache::lonxml::deregister('Apache::lonplot', |
('title','xlabel','ylabel','key','axis','label','curve')); |
('title','xlabel','ylabel','key','axis','label','curve')); |
my $result = ''; |
my $result = ''; |
|
my $randnumber; |
|
# need to call rand everytime start_script would evaluate, as the |
|
# safe space rand number generator and the global rand generator |
|
# are not seperate |
|
if ($target eq 'web' || $target eq 'tex' || $target eq 'grade' || |
|
$target eq 'answer') { |
|
$randnumber=int(rand(1000)); |
|
} |
if ($target eq 'web' || $target eq 'tex') { |
if ($target eq 'web' || $target eq 'tex') { |
&check_inputs(); # Make sure we have all the data we need |
&check_inputs(); # Make sure we have all the data we need |
## |
## |
## Determine filename |
## Determine filename |
my $tmpdir = '/home/httpd/perl/tmp/'; |
my $tmpdir = '/home/httpd/perl/tmp/'; |
my $filename = $ENV{'user.name'}.'_'.$ENV{'user.domain'}. |
my $filename = $ENV{'user.name'}.'_'.$ENV{'user.domain'}. |
'_'.time.'_'.$$.int(rand(1000)).'_plot.data'; |
'_'.time.'_'.$$.$randnumber.'_plot.data'; |
## Write the plot description to the file |
## Write the plot description to the file |
&write_gnuplot_file($tmpdir,$filename,$target); |
&write_gnuplot_file($tmpdir,$filename,$target); |
$filename = &Apache::lonnet::escape($filename); |
$filename = &Apache::lonnet::escape($filename); |