--- loncom/xml/lonplot.pm 2002/01/09 16:51:51 1.35 +++ loncom/xml/lonplot.pm 2002/01/10 16:29:54 1.37 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.35 2002/01/09 16:51:51 matthew Exp $ +# $Id: lonplot.pm,v 1.37 2002/01/10 16:29:54 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -119,7 +119,7 @@ my $words_test = sub {$_[0]=~s/\s+/ ## ## ################################################################### my @plot_edit_order = - qw/bgcolor fgcolor height width font transparent grid border/; + qw/bgcolor fgcolor height width font transparent grid border align/; my %plot_defaults = ( height => { @@ -571,7 +571,7 @@ sub start_function { $curves[-1]->{'function'} = &Apache::lonxml::get_all_text("/function",$$parser[-1]); } elsif ($target eq 'edit') { - $result .= &Apache::edit::tag_start($target,$token,'Curve Function'); + $result .= &Apache::edit::tag_start($target,$token,'Gnuplot compatible curve function'); my $text = &Apache::lonxml::get_all_text("/function",$$parser[-1]); $result .= ''. &Apache::edit::editfield('',$text,'',60,1); @@ -633,14 +633,14 @@ 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'}})){ + 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'); } push @{$curves[-1]->{'data'}},\@data; } elsif ($target eq 'edit') { - $result .= &Apache::edit::tag_start($target,$token,'Curve Data'); + $result .= &Apache::edit::tag_start($target,$token,'Comma or space deliminated curve data'); my $text = &Apache::lonxml::get_all_text("/data",$$parser[-1]); $result .= ''. &Apache::edit::editfield('',$text,'',60,1);