--- loncom/xml/lonplot.pm 2002/05/01 15:58:42 1.76 +++ loncom/xml/lonplot.pm 2002/10/11 13:06:46 1.78 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.76 2002/05/01 15:58:42 matthew Exp $ +# $Id: lonplot.pm,v 1.78 2002/10/11 13:06:46 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -112,7 +112,7 @@ my $words_test = sub {$_[0]=~s/\s+/ ## ## ################################################################### my @gnuplot_edit_order = - qw/alttag bgcolor fgcolor height width font transparent grid border align/; + qw/alttag bgcolor fgcolor height width font transparent grid samples border align/; my $gnuplot_help_text = <<"ENDPLOTHELP";

@@ -208,6 +208,13 @@ my %gnuplot_defaults = edit_type => 'choice', choices => ['small','medium','large'] }, + samples => { + default => '100', + test => $int_test, + description => 'Number of samples for non-data plots', + edit_type => 'choice', + choices => ['100','200','500','1000','2000','5000'] + }, align => { default => 'center', test => sub {$_[0]=~/^(left|right|center)$/}, @@ -312,7 +319,7 @@ my %axis_defaults = color => { default => 'x000000', test => $color_test, - description => 'color of axes (x000000)', + description => 'color of grid lines (x000000)', edit_type => 'entry', size => '10' }, @@ -1000,6 +1007,8 @@ sub write_gnuplot_file { $gnuplot_input .= ($plot{'border'} eq 'on'? 'set border'.$/ : 'set noborder'.$/ ); + # sampling rate for non-data curves + $gnuplot_input .= "set samples $plot{'samples'}\n"; # title, xlabel, ylabel # titles $gnuplot_input .= "set title \"$title\"\n" if (defined($title)) ;