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

foxr foxr at source.lon-capa.org
Tue Jul 24 07:02:58 EDT 2012


foxr		Tue Jul 24 11:02:58 2012 EDT

  Modified files:              
    /loncom/xml	lonplot.pm 
  Log:
  BZ5635 - Support rotate="yes|no"
  for <xtics>/<ytics> tags to rotate tick labels as well.
  
  
  
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.163 loncom/xml/lonplot.pm:1.164
--- loncom/xml/lonplot.pm:1.163	Tue Jul 24 10:50:54 2012
+++ loncom/xml/lonplot.pm	Tue Jul 24 11:02:58 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.163 2012/07/24 10:50:54 foxr Exp $
+# $Id: lonplot.pm,v 1.164 2012/07/24 11:02:58 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -463,7 +463,13 @@
 	 description => 'Number of minor tics per major tic mark',
 	 edit_type   => 'entry',
 	 size        => '10'
-	 },         
+	 }, 
+     rotate => {
+	 default => 'off',
+	 test    => $onoff_test,
+	 description => 'Rotate tic label by 90 degrees if on',
+	 edit_type   => 'onoff'
+     }
      );
 
 my @axis_edit_order = ('color','xmin','xmax','ymin','ymax','xformat', 'yformat', 'xzero', 'yzero');
@@ -1714,6 +1720,9 @@
 	
 	$result .= "set $type $spec->{'location'}  ";
 	$result .= ($spec->{'mirror'} eq 'on') ? 'mirror ' : 'nomirror ';
+	if ($spec->{'rotate'} eq 'on') {
+	    $result .= ' rotate ';
+	}
 	if (defined $spec->{'ticspecs'}) {
 	    $result .= '( ';
 	    my @ticspecs;
@@ -2081,7 +2090,8 @@
 	$linestyle_index++;	# Each curve get a unique linestyle.
     }
     # Write the output to a file.
-    # &Apache::lonnet::logthis($gnuplot_input); # uncomment to log the gnuplot input.
+
+    &Apache::lonnet::logthis($gnuplot_input); # uncomment to log the gnuplot input.
     open (my $fh, "> $tmpdir$filename.data");
     binmode($fh, ':utf8');
     print $fh $gnuplot_input;




More information about the LON-CAPA-cvs mailing list