--- loncom/xml/lonplot.pm 2007/05/23 22:36:28 1.117 +++ 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.117 2007/05/23 22:36:28 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', @@ -1123,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 }