version 1.117, 2007/05/23 22:36:28
|
version 1.118, 2007/06/07 23:42:14
|
Line 274 my %gnuplot_defaults =
|
Line 274 my %gnuplot_defaults =
|
}, |
}, |
gridtype => { |
gridtype => { |
default => 'Cartesian', |
default => 'Cartesian', |
test => sub {$_[0]=~/^(Polar|Cartesian)$/}, |
test => sub {$_[0]=~/^(Polar|Cartesian|Linear-Log|Log-Linear|Log-Log)$/}, |
description => 'Grid type:', |
description => 'Grid type:', |
edit_type => 'choice', |
edit_type => 'choice', |
choices => ['Cartesian','Polar'] |
choices => ['Cartesian','Polar','Linear-Log','Log-Linear','Log-Log'] |
}, |
}, |
lmargin => { |
lmargin => { |
default => 'default', |
default => 'default', |
Line 1123 sub write_gnuplot_file {
|
Line 1123 sub write_gnuplot_file {
|
# cartesian or polar grid? |
# cartesian or polar grid? |
if (lc($Apache::lonplot::plot{'gridtype'}) eq 'polar') { |
if (lc($Apache::lonplot::plot{'gridtype'}) eq 'polar') { |
$gnuplot_input .= 'set grid 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 { |
} else { |
# Assume Cartesian |
# Assume Cartesian |
} |
} |