Inconsistent font handling in axis labels

Hello,

I would like to create PDFs of plot using the Helvetica font in the
Light variant. In my old Mac OS X installation I somehow achieved this,
I don't remember exactly how, but probably with an ugly hack that
involved making matplotlib aware only of this variant of the font. In my
new Mac OS X install I would like to solve this more properly.

I have Mac OS X 10.9 and I installed matplotlib 1.3.1 via Mac Ports.

I also installed "fondu" to and I converted the Helvetica.dfont bundle
into TTF fonts that I places into the mpl-data folder. I deleted the
matplotlib font cache file and modified my matplotlibrc configuration
file like this:

  font.family: sans-serif
  font.sans-serif: Helvetica
  font.weight: light

The effect is that the plot title, legend, and tick mark labels are
correctly rendered in Helvetica Light, while axis labels are rendered in
Helvetica Regular.

I'm I missing something or there is a problem in matplotlib for which
the weight font attribute is not respected for axis labels?

Thanks. Cheers,
Daniele

I was indeed missing a couple of options in matplotlibrc:

  axes.labelweight : light
  axes.titleweight : light

however, it is quite confusing that tick labels and legend are affected
by the text.weight setting while other parts of the plot are not. I'm
wondering if something could be done about it...

Cheers,
Daniele

···

On 23/09/14 13:51, Daniele Nicolodi wrote:

The effect is that the plot title, legend, and tick mark labels are
correctly rendered in Helvetica Light, while axis labels are rendered in
Helvetica Regular.

I'm I missing something or there is a problem in matplotlib for which
the weight font attribute is not respected for axis labels?