using different font families with LaTeX-generated text

Setting the font family with matplotlib.rc (or in my
.matplotlib/matplotlibrc file) doesn't seem to have any effect on the
font used to generate text when the usetex setting is enabled. This
seems to imply that the fonts I have listed in the font.serif,
font.sans-serif, and font.monospace settings (specifically, Times,
Helvetica, and Courier) are not deemed to be valid from LaTeX's point
of view. However, my LaTeX installation does appear to contain the
psnfss files. Is there something I am overlooking?

I am using matplotlib 0.90.0 and teTeX 3.0 on Linux.

            L.G.

changing the font family works for me. Maybe you should try deleting
your .matplotlib/tex.cache and trying again.

···

On Friday 11 May 2007 12:12:37 pm Lev Givon wrote:

Setting the font family with matplotlib.rc (or in my
.matplotlib/matplotlibrc file) doesn't seem to have any effect on the
font used to generate text when the usetex setting is enabled. This
seems to imply that the fonts I have listed in the font.serif,
font.sans-serif, and font.monospace settings (specifically, Times,
Helvetica, and Courier) are not deemed to be valid from LaTeX's point
of view. However, my LaTeX installation does appear to contain the
psnfss files. Is there something I am overlooking?

I am using matplotlib 0.90.0 and teTeX 3.0 on Linux.

Received from Darren Dale on Fri, May 11, 2007 at 05:29:01PM EDT:

···

On Friday 11 May 2007 12:12:37 pm Lev Givon wrote:
> Setting the font family with matplotlib.rc (or in my
> .matplotlib/matplotlibrc file) doesn't seem to have any effect on the
> font used to generate text when the usetex setting is enabled. This
> seems to imply that the fonts I have listed in the font.serif,
> font.sans-serif, and font.monospace settings (specifically, Times,
> Helvetica, and Courier) are not deemed to be valid from LaTeX's point
> of view. However, my LaTeX installation does appear to contain the
> psnfss files. Is there something I am overlooking?
>
> I am using matplotlib 0.90.0 and teTeX 3.0 on Linux.

changing the font family works for me. Maybe you should try deleting
your .matplotlib/tex.cache and trying again.

Apparently the weirdness I observed is a bit more subtle than I
described: changing the font with the usetex setting on does indeed
change the font used for the plot title and axis labels, but not for
the axis ticks. Changing the font with the usetex settings off causes
the selected font family to be used for the axis ticks.

              L.G.

Received from Lev Givon on Sun, May 13, 2007 at 04:46:54PM EDT:

Received from Darren Dale on Fri, May 11, 2007 at 05:29:01PM EDT:
> > Setting the font family with matplotlib.rc (or in my
> > .matplotlib/matplotlibrc file) doesn't seem to have any effect on the
> > font used to generate text when the usetex setting is enabled. This
> > seems to imply that the fonts I have listed in the font.serif,
> > font.sans-serif, and font.monospace settings (specifically, Times,
> > Helvetica, and Courier) are not deemed to be valid from LaTeX's point
> > of view. However, my LaTeX installation does appear to contain the
> > psnfss files. Is there something I am overlooking?
> >
> > I am using matplotlib 0.90.0 and teTeX 3.0 on Linux.
>
> changing the font family works for me. Maybe you should try deleting
> your .matplotlib/tex.cache and trying again.

Apparently the weirdness I observed is a bit more subtle than I
described: changing the font with the usetex setting on does indeed
change the font used for the plot title and axis labels, but not for
the axis ticks. Changing the font with the usetex settings off causes
the selected font family to be used for the axis ticks.

              L.G.

Ah..I see what was going on; the numerical ticks are output in LaTeX
math mode (e.g., $123$) and therefore rendered in CM if the specified
fonts do not provide any math fonts. Is there a way to use LaTeX font
packages such as euler, ccfonts, and cmbright?

              L.G.

···

> On Friday 11 May 2007 12:12:37 pm Lev Givon wrote:

Not at present, no.

···

On Sunday 13 May 2007 6:32:56 pm Lev Givon wrote:

Received from Lev Givon on Sun, May 13, 2007 at 04:46:54PM EDT:
> Received from Darren Dale on Fri, May 11, 2007 at 05:29:01PM EDT:
> > On Friday 11 May 2007 12:12:37 pm Lev Givon wrote:
> > > Setting the font family with matplotlib.rc (or in my
> > > .matplotlib/matplotlibrc file) doesn't seem to have any effect on the
> > > font used to generate text when the usetex setting is enabled. This
> > > seems to imply that the fonts I have listed in the font.serif,
> > > font.sans-serif, and font.monospace settings (specifically, Times,
> > > Helvetica, and Courier) are not deemed to be valid from LaTeX's point
> > > of view. However, my LaTeX installation does appear to contain the
> > > psnfss files. Is there something I am overlooking?
> > >
> > > I am using matplotlib 0.90.0 and teTeX 3.0 on Linux.
> >
> > changing the font family works for me. Maybe you should try deleting
> > your .matplotlib/tex.cache and trying again.
>
> Apparently the weirdness I observed is a bit more subtle than I
> described: changing the font with the usetex setting on does indeed
> change the font used for the plot title and axis labels, but not for
> the axis ticks. Changing the font with the usetex settings off causes
> the selected font family to be used for the axis ticks.
>
> L.G.

Ah..I see what was going on; the numerical ticks are output in LaTeX
math mode (e.g., $123$) and therefore rendered in CM if the specified
fonts do not provide any math fonts. Is there a way to use LaTeX font
packages such as euler, ccfonts, and cmbright?

Received from Darren Dale on Sun, May 13, 2007 at 08:13:43PM EDT:

(snip)

> Ah..I see what was going on; the numerical ticks are output in LaTeX
> math mode (e.g., $123$) and therefore rendered in CM if the specified
> fonts do not provide any math fonts. Is there a way to use LaTeX font
> packages such as euler, ccfonts, and cmbright?

Not at present, no.

In the matplotlib-users list archive, I noticed that someone once
mooted the possibility of patching the matplotlib LaTeX code to
provide a user-configurable parameter that would allow one to add
extra lines to the LaTeX preamble. I didn't see any responses from the
matplotlib developers regarding their opinions of the suggested patch,
however.

                                      L.G.

···

On Sunday 13 May 2007 6:32:56 pm Lev Givon wrote:

I am not in favor of adding a parameter that allows users to add additional
lines to the preamble. It took a lot of work to get usetex working on all
platforms, and I just don't have the kind of time anymore to add an option
that will allow endless configuration of latex parameters. It's not the
implementation of the patch that is the problem, it is all the support
requests that will follow from latex-specific failures related to customized
preamble settings.

Darren

···

On Monday 14 May 2007 9:02:08 am Lev Givon wrote:

Received from Darren Dale on Sun, May 13, 2007 at 08:13:43PM EDT:
> On Sunday 13 May 2007 6:32:56 pm Lev Givon wrote:

(snip)

> > Ah..I see what was going on; the numerical ticks are output in LaTeX
> > math mode (e.g., $123$) and therefore rendered in CM if the specified
> > fonts do not provide any math fonts. Is there a way to use LaTeX font
> > packages such as euler, ccfonts, and cmbright?
>
> Not at present, no.

In the matplotlib-users list archive, I noticed that someone once
mooted the possibility of patching the matplotlib LaTeX code to
provide a user-configurable parameter that would allow one to add
extra lines to the LaTeX preamble. I didn't see any responses from the
matplotlib developers regarding their opinions of the suggested patch,
however.