[LON-CAPA-cvs] cvs: loncom /xml lonplot.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Mon, 24 Mar 2008 21:53:42 -0000


raeburn		Mon Mar 24 17:53:42 2008 EDT

  Modified files:              
    /loncom/xml	lonplot.pm 
  Log:
  -  regexp substitution for $curve->{'color'} replaces x as first character in string.
  
  
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.135 loncom/xml/lonplot.pm:1.136
--- loncom/xml/lonplot.pm:1.135	Wed Mar 19 17:09:09 2008
+++ loncom/xml/lonplot.pm	Mon Mar 24 17:53:41 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.135 2008/03/19 21:09:09 faziophi Exp $
+# $Id: lonplot.pm,v 1.136 2008/03/24 21:53:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1483,7 +1483,7 @@
                 $gnuplot_input.= $linetypes{$curve->{'linetype'}};
                 $gnuplot_input.= ' linecolor rgb "';
                 # convert color from xaaaaaa to #aaaaaa
-                $curve->{'color'} =~ s/x/#/;
+                $curve->{'color'} =~ s/^x/#/;
                 $gnuplot_input.= $curve->{'color'}.'"';
             }
             $gnuplot_input.= ' linewidth '.$curve->{'linewidth'};
@@ -1527,7 +1527,7 @@
                 $gnuplot_input.= $linetypes{$curve->{'linetype'}};
                 $gnuplot_input.= ' linecolor rgb "';
                 # convert color from xaaaaaa to #aaaaaa
-                $curve->{'color'} =~ s/x/#/;
+                $curve->{'color'} =~ s/^x/#/;
                 $gnuplot_input.= $curve->{'color'}.'"';
             }
                 $gnuplot_input.= ' linewidth '.$curve->{'linewidth'};