--- loncom/xml/lonplot.pm 2008/06/10 12:48:30 1.147 +++ loncom/xml/lonplot.pm 2009/03/18 14:05:19 1.148.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.147 2008/06/10 12:48:30 www Exp $ +# $Id: lonplot.pm,v 1.148.2.2 2009/03/18 14:05:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -496,7 +496,7 @@ my %axis_defaults = yformat => { default => 'on', test => sub {$_[0]=~/^(on|off|\d+(f|F|e|E))$/}, - description => 'X-axis number formatting', + description => 'Y-axis number formatting', edit_type => 'choice', choices => ['on', 'off', '2e', '2f'], }, @@ -1433,7 +1433,7 @@ sub start_data { } # complain if the number of data points is not the same as # in previous sets of data. - if (($curves[-1]->{'data'}) && ($#data != $#{@{$curves[-1]->{'data'}->[0]}})){ + if (($curves[-1]->{'data'}) && ($#data != $#{$curves[-1]->{'data'}->[0]})){ &Apache::lonxml::warning ('Number of data points is not consistent with previous '. 'number of data points'); @@ -1696,14 +1696,13 @@ sub write_gnuplot_file { $gnuplot_input .= "$ytics{'start'}, "; $gnuplot_input .= "$ytics{'increment'}, "; $gnuplot_input .= "$ytics{'end'} "; + if ($target eq 'tex') { + $gnuplot_input .= 'font "Helvetica,22"'; # Needed in iso-8859-1 encoding. + } + $gnuplot_input .= "\n"; if ($ytics{'minorfreq'} != 0) { $gnuplot_input .= "set mytics ".$ytics{'minorfreq'}."\n"; } - if ($target eq 'tex') { - $gnuplot_input .= 'font "Helvetica,22"'; # Needed in iso-8859-1 encoding. - } - $gnuplot_input .= "\n"; - } else { if ($target eq 'tex') { $gnuplot_input .= 'set ytics font "Helvetica,22"'."\n"; # Needed for iso 8859-1 enc.