Hi Bob,
> text.set(mode=3D"latex")
> text.preamble(r"\usepackage{times}")
> g =3D graph.graphxy(width=3D15.,\
> x=3Dgraph.axis.lin(min=3D0., max=3D2000.,\
> title=3Dr'\Large\textsf{x-axis title}'),
> y=3Dgraph.axis.lin(max=3D125.,\
> title=3Dr'\Large\textsf{y-axis title}'))
>=20
> then the axis titles behave as I want: Helvetica is used due to =20
> "\usepackage{times}", but the tick labels along the axes are still in =20
> Computer-Modern.
The reason for this behavior is that the labels are set in mathmode. If
you do not own Helvetica math fonts (as is the case for most of us, I guess)
you have to instruct PyX not to typeset labels in mathmode by specifying
the axis texter as follows:
texter=3Dgraph.axis.texter.decimal(labelattrs=3D[])
In addition, you have to make sure that sans serif fonts are used
everywhere by saying:
text.preamble(r"""\renewcommand{\familydefault}{\sfdefault}
\usepackage{times}""")
As a side effect, it should not be necessary anymore to explicitly specify
that titles are to be typeset in sans serif as this is automatic.
A side remark: If at some point you want to create labels in Times, use
the mathptmx package instead of the obsolete times package.=20
Best regards,
Gert
--=20
Gert-Ludwig Ingold email: Gert.Ingold@...
Institut f=FCr Physik Phone: +49-821-598-3234
Universit=E4t Augsburg Fax : +49-821-598-3222
D-86135 Augsburg WWW : http://www.physik.uni-augsburg.de/theo1/ingold
Germany PGP : 86FF5A93, key available from homepage
|