--- loncom/xml/lonplot.pm 2007/02/21 20:47:49 1.116 +++ loncom/xml/lonplot.pm 2007/06/07 23:42:14 1.118 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.116 2007/02/21 20:47:49 albertel Exp $ +# $Id: lonplot.pm,v 1.118 2007/06/07 23:42:14 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -274,10 +274,10 @@ my %gnuplot_defaults = }, gridtype => { default => 'Cartesian', - test => sub {$_[0]=~/^(Polar|Cartesian)$/}, + test => sub {$_[0]=~/^(Polar|Cartesian|Linear-Log|Log-Linear|Log-Log)$/}, description => 'Grid type:', edit_type => 'choice', - choices => ['Cartesian','Polar'] + choices => ['Cartesian','Polar','Linear-Log','Log-Linear','Log-Log'] }, lmargin => { default => 'default', @@ -863,7 +863,6 @@ sub start_curve { ($token,$parstack,$safeeval,keys(%curve_defaults)); if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); - $result.= &Apache::edit::handle_insert(); } } return $result; @@ -1124,6 +1123,13 @@ sub write_gnuplot_file { # cartesian or polar grid? if (lc($Apache::lonplot::plot{'gridtype'}) eq 'polar') { $gnuplot_input .= 'set grid polar'.$/; + } elsif (lc($Apache::lonplot::plot{'gridtype'}) eq 'linear-log') { + $gnuplot_input .= 'set logscale x'.$/; + } elsif (lc($Apache::lonplot::plot{'gridtype'}) eq 'log-linear') { + $gnuplot_input .= 'set logscale y'.$/; + } elsif (lc($Apache::lonplot::plot{'gridtype'}) eq 'log-log') { + $gnuplot_input .= 'set logscale x'.$/; + $gnuplot_input .= 'set logscale y'.$/; } else { # Assume Cartesian }