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

raeburn raeburn at source.lon-capa.org
Sun Oct 7 11:04:44 EDT 2012


raeburn		Sun Oct  7 15:04:44 2012 EDT

  Modified files:              
    /loncom/xml	lonplot.pm 
  Log:
  - Support gnuplot 4.6 (used by SuSE 12.2).
    - color attributes in 4.6 begin with # instead of x.
  
  
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.166 loncom/xml/lonplot.pm:1.167
--- loncom/xml/lonplot.pm:1.166	Mon Sep 10 09:51:15 2012
+++ loncom/xml/lonplot.pm	Sun Oct  7 15:04:44 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.166 2012/09/10 09:51:15 foxr Exp $
+# $Id: lonplot.pm,v 1.167 2012/10/07 15:04:44 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -132,7 +132,12 @@
     sub {$_[0]=~s/\s+//g;$_[0]=~/^[+-]?\d*\.?\d*([eE][+-]\d+)?$/};
 my $pos_real_test  =
     sub {$_[0]=~s/\s+//g;$_[0]=~/^[+]?\d*\.?\d*([eE][+-]\d+)?$/};
-my $color_test     = sub {$_[0]=~s/\s+//g;$_[0]=~/^x[\da-fA-F]{6}$/};
+my $color_test;
+if ($version < 4.6) {
+    $color_test = sub {$_[0]=~s/\s+//g;$_[0]=~s/^\#/x/;$_[0]=~/^x[\da-fA-F]{6}$/};
+} else {
+    $color_test = sub {$_[0]=~s/\s+//g;$_[0]=~s/^x/#/;$_[0]=~/^\#[\da-fA-F]{6}$/};
+}
 my $onoff_test     = sub {$_[0]=~/^(on|off)$/};
 my $key_pos_test   = sub {$_[0]=~/^(top|bottom|right|left|outside|below| )+$/};
 my $sml_test       = sub {$_[0]=~/^(\d+|small|medium|large)$/};




More information about the LON-CAPA-cvs mailing list