--- loncom/xml/lonplot.pm 2004/09/09 19:48:21 1.102 +++ loncom/xml/lonplot.pm 2004/12/02 15:38:11 1.104 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.102 2004/09/09 19:48:21 albertel Exp $ +# $Id: lonplot.pm,v 1.104 2004/12/02 15:38:11 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -246,7 +246,7 @@ my %gnuplot_defaults = bmargin => { default => 'default', test => sub {$_[0]=~/^(default|\d+)$/}, - description => 'Bottm margin width (pts):', + description => 'Bottom margin width (pts):', edit_type => 'choice', choices => $margin_choices, }, @@ -1030,7 +1030,7 @@ sub write_gnuplot_file { } # set term if ($target eq 'web') { - $gnuplot_input .= 'set term gif '; + $gnuplot_input .= 'set term '.$weboutputformat .' '; $gnuplot_input .= 'transparent ' if ($plot{'transparent'} eq 'on'); $gnuplot_input .= $plot{'font'} . ' '; $gnuplot_input .= 'size '.$plot{'width'}.','.$plot{'height'}.' '; @@ -1123,7 +1123,11 @@ sub write_gnuplot_file { my $label; foreach $label (@labels) { $gnuplot_input .= 'set label "'.$label->{'text'}.'" at '. - $label->{'xpos'}.','.$label->{'ypos'}.' '.$label->{'justify'}.' font "Helvetica,'.$pt.'pt"'.$/ ; + $label->{'xpos'}.','.$label->{'ypos'}.' '.$label->{'justify'}; + if ($target eq 'tex') { + $gnuplot_input .=' font "Helvetica,'.$pt.'pt"' ; + } + $gnuplot_input .= $/; } if ($target eq 'tex') { $gnuplot_input .="set size 1,".$plot{'height'}/$plot{'width'}*1.38;