--- loncom/xml/lonplot.pm 2002/04/24 16:38:40 1.66 +++ loncom/xml/lonplot.pm 2002/04/24 21:24:40 1.67 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.66 2002/04/24 16:38:40 matthew Exp $ +# $Id: lonplot.pm,v 1.67 2002/04/24 21:24:40 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -104,7 +104,7 @@ my $onoff_test = sub {$_[0]=~/^(on|o my $key_pos_test = sub {$_[0]=~/^(top|bottom|right|left|outside|below| )+$/}; my $sml_test = sub {$_[0]=~/^(small|medium|large)$/}; my $linestyle_test = sub {exists($linestyles{$_[0]})}; -my $words_test = sub {$_[0]=~s/\s+/ /g;$_[0]=~/^([\w\(\)]+ ?)+$/}; +my $words_test = sub {$_[0]=~s/\s+/ /g;$_[0]=~/^([\w~!\@\#\$\%^&\*\(\)-=_\+\[\]\{\}:\;\'<>,\.\/\?\\]+ ?)+$/}; ################################################################### ## ## @@ -999,7 +999,8 @@ sub write_gnuplot_file { # border $gnuplot_input .= ($plot{'border'} eq 'on'? 'set border'.$/ : - 'set noborder'.$/ ); # title, xlabel, ylabel + 'set noborder'.$/ ); + # title, xlabel, ylabel # titles $gnuplot_input .= "set title \"$title\"\n" if (defined($title)) ; $gnuplot_input .= "set xlabel \"$xlabel\"\n" if (defined($xlabel)); @@ -1028,7 +1029,7 @@ sub write_gnuplot_file { if (%key) { $gnuplot_input .= 'set key '.$key{'pos'}.' '; if ($key{'title'} ne '') { - $gnuplot_input .= 'title " '.$key{'title'}.'" '; + $gnuplot_input .= 'title "'.$key{'title'}.'" '; } $gnuplot_input .= ($key{'box'} eq 'on' ? 'box ' : 'nobox ').$/; } else {