version 1.154, 2012/02/13 11:24:16
|
version 1.155, 2012/02/22 10:16:39
|
Line 624 sub start_gnuplot {
|
Line 624 sub start_gnuplot {
|
} elsif ($target eq 'modified') { |
} elsif ($target eq 'modified') { |
my $constructtag=&Apache::edit::get_new_args |
my $constructtag=&Apache::edit::get_new_args |
($token,$parstack,$safeeval,keys(%gnuplot_defaults)); |
($token,$parstack,$safeeval,keys(%gnuplot_defaults)); |
|
|
if ($constructtag) { |
if ($constructtag) { |
|
# |
|
# The color chooser does not prepent x to the color values |
|
# Do that here: |
|
# |
|
foreach my $attribute ('bgcolor', 'fgcolor') { |
|
my $value = $token->[2]{$attribute}; |
|
if (defined $value && !($value =~ /^x/)) { |
|
$token->[2]{$attribute} = 'x' . $value; |
|
} |
|
} |
$result = &Apache::edit::rebuild_tag($token); |
$result = &Apache::edit::rebuild_tag($token); |
} |
} |
} |
} |
Line 1355 sub start_curve {
|
Line 1366 sub start_curve {
|
my $constructtag=&Apache::edit::get_new_args |
my $constructtag=&Apache::edit::get_new_args |
($token,$parstack,$safeeval,keys(%curve_defaults)); |
($token,$parstack,$safeeval,keys(%curve_defaults)); |
if ($constructtag) { |
if ($constructtag) { |
|
# |
|
# Fix up the color attribute as jcolor does not prepend an x |
|
# |
|
my $value = $token->[2]{'color'}; |
|
if (defined $value && !($value =~ /^x/)) { |
|
$token->[2]{'color'} = 'x' . $value; |
|
} |
$result = &Apache::edit::rebuild_tag($token); |
$result = &Apache::edit::rebuild_tag($token); |
} |
} |
} |
} |
Line 1501 sub start_axis {
|
Line 1519 sub start_axis {
|
} elsif ($target eq 'modified') { |
} elsif ($target eq 'modified') { |
my $constructtag=&Apache::edit::get_new_args |
my $constructtag=&Apache::edit::get_new_args |
($token,$parstack,$safeeval,keys(%axis_defaults)); |
($token,$parstack,$safeeval,keys(%axis_defaults)); |
|
|
if ($constructtag) { |
if ($constructtag) { |
|
# |
|
# Fix up the color attribute since jchooser does not |
|
# prepend an x to the color: |
|
# |
|
my $value = $token->[2]{'color'}; |
|
if (defined $value && !($value =~ /^x/)) { |
|
$token->[2]{'color'} = 'x' . $value; |
|
} |
|
|
$result = &Apache::edit::rebuild_tag($token); |
$result = &Apache::edit::rebuild_tag($token); |
} |
} |
} |
} |
Line 1594 sub write_gnuplot_file {
|
Line 1622 sub write_gnuplot_file {
|
$curve->{'color'} : |
$curve->{'color'} : |
$Apache::lonplot::plot{'fgcolor'} ); |
$Apache::lonplot::plot{'fgcolor'} ); |
} |
} |
|
|
# set term |
# set term |
if ($target eq 'web') { |
if ($target eq 'web') { |
$gnuplot_input .= 'set terminal png enhanced nocrop '; |
$gnuplot_input .= 'set terminal png enhanced nocrop '; |