--- loncom/xml/lonplot.pm 2002/01/28 14:12:34 1.45 +++ loncom/xml/lonplot.pm 2002/01/30 13:27:51 1.46 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.45 2002/01/28 14:12:34 matthew Exp $ +# $Id: lonplot.pm,v 1.46 2002/01/30 13:27:51 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -882,14 +882,14 @@ sub write_gnuplot_file { # tics if (%xtics) { $gnuplot_input .= "set xtics $xtics{'location'} "; - $gnuplot_input .= ( $xtics{'mirror'} eq 'on' ? "mirror" : "nomirror "); + $gnuplot_input .= ( $xtics{'mirror'} eq 'on'?"mirror ":"nomirror "); $gnuplot_input .= "$xtics{'start'}, "; $gnuplot_input .= "$xtics{'increment'}, "; $gnuplot_input .= "$xtics{'end'}\n"; } if (%ytics) { $gnuplot_input .= "set ytics $ytics{'location'} "; - $gnuplot_input .= ( $ytics{'mirror'} eq 'on' ? "mirror" : "nomirror "); + $gnuplot_input .= ( $ytics{'mirror'} eq 'on'?"mirror ":"nomirror "); $gnuplot_input .= "$ytics{'start'}, "; $gnuplot_input .= "$ytics{'increment'}, "; $gnuplot_input .= "$ytics{'end'}\n"; @@ -1039,29 +1039,35 @@ sub insert_plot { return $result; } +sub insert_tics { + my $result; + $result .= &insert_xtics() . &insert_ytics; + return $result; +} + sub insert_xtics { my $result; - $result .= " {'default'}\"\n"; + $result .= "$attr=\"$tic_defaults{$attr}->{'default'}\" "; } - $result .= " />\n"; + $result .= "/>\n"; return $result; } sub insert_ytics { my $result; - $result .= " {'default'}\"\n"; + $result .= "$attr=\"$tic_defaults{$attr}->{'default'}\" "; } - $result .= " />\n"; + $result .= "/>\n"; return $result; } sub insert_key { my $result; - $result .= " {'default'}\"\n"; } @@ -1071,7 +1077,7 @@ sub insert_key { sub insert_axis{ my $result; - $result .= ' {'default'}\"\n"; } @@ -1079,13 +1085,13 @@ sub insert_axis{ return $result; } -sub insert_title { return " \n"; } -sub insert_xlabel { return " \n"; } -sub insert_ylabel { return " \n"; } +sub insert_title { return "\n \n"; } +sub insert_xlabel { return "\n \n"; } +sub insert_ylabel { return "\n \n"; } sub insert_label { my $result; - $result .= '