[LON-CAPA-cvs] cvs: loncom(version_2_5_X) /xml lonplot.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 05 Sep 2007 13:38:18 -0000
albertel Wed Sep 5 09:38:18 2007 EDT
Modified files: (Branch: version_2_5_X)
/loncom/xml lonplot.pm
Log:
- backport 1.119's linewidth changes
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.118 loncom/xml/lonplot.pm:1.118.2.1
--- loncom/xml/lonplot.pm:1.118 Thu Jun 7 19:42:14 2007
+++ loncom/xml/lonplot.pm Wed Sep 5 09:38:18 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Dynamic plot
#
-# $Id: lonplot.pm,v 1.118 2007/06/07 23:42:14 albertel Exp $
+# $Id: lonplot.pm,v 1.118.2.1 2007/09/05 13:38:18 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -467,7 +467,7 @@
}
);
-my @curve_edit_order = ('color','name','linestyle','pointtype','pointsize','limit');
+my @curve_edit_order = ('color','name','linestyle','linewidth','pointtype','pointsize','limit');
my %curve_defaults =
(
@@ -492,14 +492,13 @@
edit_type => 'choice',
choices => [keys(%linestyles)]
},
-# gnuplots term=gif driver does not handle linewidth :(
-# linewidth => {
-# default => 1,
-# test => $int_test,
-# description => 'Line width (may not apply to all line styles)',
-# edit_type => 'choice',
-# choices => [1,2,3,4,5,6,7,8,9,10]
-# },
+ linewidth => {
+ default => 4,
+ test => $int_test,
+ description => 'Line width (may not apply to all line styles)',
+ edit_type => 'choice',
+ choices => [1,2,3,4,5,6,7,8,9,10]
+ },
pointsize => {
default => 1,
test => $pos_real_test,
@@ -1239,12 +1238,16 @@
for (my $i = 0;$i<=$#curves;$i++) {
$curve = $curves[$i];
$gnuplot_input.= ', ' if ($i > 0);
+ if ($target eq 'tex') {
+ $curve->{'linewidth'} *= 2;
+ }
if (exists($curve->{'function'})) {
$gnuplot_input.=
$curve->{'function'}.' title "'.
$curve->{'name'}.'" with '.
$curve->{'linestyle'};
- $gnuplot_input.= ' linewidth 4 ' if ($target eq 'tex');
+ $gnuplot_input.= ' linewidth '.$curve->{'linewidth'};
+
if (($curve->{'linestyle'} eq 'points') ||
($curve->{'linestyle'} eq 'linespoints') ||
($curve->{'linestyle'} eq 'errorbars') ||
@@ -1279,7 +1282,7 @@
$gnuplot_input.= '"'.$datafilename.'" title "'.
$curve->{'name'}.'" with '.
$curve->{'linestyle'};
- $gnuplot_input.= ' linewidth 4 ' if ($target eq 'tex');
+ $gnuplot_input.= ' linewidth '.$curve->{'linewidth'};
if (($curve->{'linestyle'} eq 'points') ||
($curve->{'linestyle'} eq 'linespoints') ||
($curve->{'linestyle'} eq 'errorbars') ||