--- loncom/xml/lonplot.pm 2007/12/14 06:34:59 1.133 +++ loncom/xml/lonplot.pm 2008/01/20 02:47:06 1.134 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.133 2007/12/14 06:34:59 albertel Exp $ +# $Id: lonplot.pm,v 1.134 2008/01/20 02:47:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -385,6 +385,13 @@ my %label_defaults = description => 'justification of the label text on the plot', edit_type => 'choice', choices => ['left','right','center'] + }, + rotate => { + default => 0, + test => $real_test, + description => 'Rotation of label (degrees)', + edit_type => 'entry', + size => '10', } ); @@ -1418,7 +1425,12 @@ sub write_gnuplot_file { my $label; foreach $label (@labels) { $gnuplot_input .= 'set label "'.$label->{'text'}.'" at '. - $label->{'xpos'}.','.$label->{'ypos'}.' '.$label->{'justify'}; + $label->{'xpos'}.','.$label->{'ypos'}; + if ($label->{'rotate'} ne '') { + $gnuplot_input .= ' rotate by '.$label->{'rotate'}; + } + $gnuplot_input .= ' '.$label->{'justify'}; + if ($target eq 'tex') { $gnuplot_input .=' font "'.$font_properties->{'printname'}.','.$fontsize.'pt"' ; }