--- loncom/xml/lonplot.pm 2009/11/14 19:13:36 1.152 +++ loncom/xml/lonplot.pm 2014/07/09 15:17:32 1.152.6.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.152 2009/11/14 19:13:36 faziophi Exp $ +# $Id: lonplot.pm,v 1.152.6.1 2014/07/09 15:17:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1681,8 +1681,12 @@ sub write_gnuplot_file { $gnuplot_input .= "set samples $Apache::lonplot::plot{'samples'}\n"; # title, xlabel, ylabel # titles - my $extra_space_x = ($xtics{'location'} eq 'axis') ? ' 0, -0.5 ' : ''; - my $extra_space_y = ($ytics{'location'} eq 'axis') ? ' -0.5, 0 ' : ''; + my $offset; + if ($version >= 4.4) { + $offset = 'offset '; + } + my $extra_space_x = ($xtics{'location'} eq 'axis') ? ' '.$offset.'0, -0.5 ' : ''; + my $extra_space_y = ($ytics{'location'} eq 'axis') ? ' '.$offset.'-0.5, 0 ' : ''; if ($target eq 'tex') { $gnuplot_input .= "set title \"$title\" font \"".$font_properties->{'printname'}.",".$fontsize."pt\"\n" if (defined($title)) ;