[LON-CAPA-cvs] cvs: loncom /xml lonplot.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 09 Jun 2008 10:07:06 -0000
foxr Mon Jun 9 06:07:06 2008 EDT
Modified files:
/loncom/xml lonplot.pm
Log:
Unconditionally hard-wire the tic fonts for printing to Helvetica.
This is done since the DejaVu sans seems to have a problem with the
mius sign in tick labelling, while helvetica does not.
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.145 loncom/xml/lonplot.pm:1.146
--- loncom/xml/lonplot.pm:1.145 Tue Jun 3 06:49:00 2008
+++ loncom/xml/lonplot.pm Mon Jun 9 06:07:01 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Dynamic plot
#
-# $Id: lonplot.pm,v 1.145 2008/06/03 10:49:00 foxr Exp $
+# $Id: lonplot.pm,v 1.146 2008/06/09 10:07:01 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -757,6 +757,7 @@
$selected_font = $font_properties{$Apache::lonplot::plot{'fontface'}};
}
if ($target eq 'tex' && defined($Apache::lonplot::plot{'texfont'})) {
+# $selected_font = $font_properties{'classic'};
$size = $Apache::lonplot::plot{'texfont'};
}
return ($size, $selected_font);
@@ -1675,20 +1676,37 @@
$gnuplot_input .= ( $xtics{'mirror'} eq 'on'?"mirror ":"nomirror ");
$gnuplot_input .= "$xtics{'start'}, ";
$gnuplot_input .= "$xtics{'increment'}, ";
- $gnuplot_input .= "$xtics{'end'}\n";
+ $gnuplot_input .= "$xtics{'end'} ";
+ if ($target eq 'tex') {
+ $gnuplot_input .= 'font "Helvetica,22"'; # Needed in iso 8859-1 enc.
+ }
+ $gnuplot_input .= "\n";
if ($xtics{'minorfreq'} != 0) {
$gnuplot_input .= "set mxtics ".$xtics{'minorfreq'}."\n";
}
+ } else {
+ if ($target eq 'tex') {
+ $gnuplot_input .= 'set xtics font "Helvetica,22"'."\n"; # needed in iso 8859-1 enc
+ }
}
if (%ytics) {
$gnuplot_input .= "set ytics $ytics{'location'} ";
$gnuplot_input .= ( $ytics{'mirror'} eq 'on'?"mirror ":"nomirror ");
$gnuplot_input .= "$ytics{'start'}, ";
$gnuplot_input .= "$ytics{'increment'}, ";
- $gnuplot_input .= "$ytics{'end'}\n";
+ $gnuplot_input .= "$ytics{'end'} ";
if ($ytics{'minorfreq'} != 0) {
$gnuplot_input .= "set mytics ".$ytics{'minorfreq'}."\n";
}
+ if ($target eq 'tex') {
+ $gnuplot_input .= 'font "Helvetica,22"'; # Needed in iso-8859-1 encoding.
+ }
+ $gnuplot_input .= "\n";
+
+ } else {
+ if ($target eq 'tex') {
+ $gnuplot_input .= 'set ytics font "Helvetica,22"'."\n"; # Needed for iso 8859-1 enc.
+ }
}
# axis
if (%axis) {