[Matplotlib-users] All CM fonts

2009-01-12 Thread T J
Hi, my matplotlibrc file is:

backend : GTKAgg
text.usetex : True
text.latex.preview : True
ps.usedistiller : xpdf

However, when I create images, regular text is not in the CM font.
When checking the fonts in a pdf viewer, I get:

CM12, Type 1, Embedded
NimbusSanL-Regu, Type 1, Embedded

So it looks as if the plot title, for example, is getting Nimbus
rather than CM.  What is the 'proper' way to get all the fonts to
match my document?  Using:

title(r'$\textrm{title}$')

results in a different font (but still not what I was expecting):
CenturySchL-Roma  Below is the output of rcParams.

Thanks.


{'agg.path.chunksize': 0,
 'axes.axisbelow': False,
 'axes.edgecolor': 'k',
 'axes.facecolor': 'w',
 'axes.formatter.limits': [-7, 7],
 'axes.grid': False,
 'axes.hold': True,
 'axes.labelcolor': 'k',
 'axes.labelsize': 'medium',
 'axes.linewidth': 1.0,
 'axes.titlesize': 'large',
 'axes.unicode_minus': True,
 'backend': 'GTKAgg',
 'backend_fallback': True,
 'cairo.format': 'png',
 'contour.negative_linestyle': 'dashed',
 'datapath': '/usr/local/lib/python2.5/site-packages/matplotlib/mpl-data',
 'docstring.hardcopy': False,
 'figure.autolayout': False,
 'figure.dpi': 80,
 'figure.edgecolor': 'w',
 'figure.facecolor': '0.75',
 'figure.figsize': [8.0, 6.0],
 'figure.subplot.bottom': 0.10001,
 'figure.subplot.hspace': 0.20001,
 'figure.subplot.left': 0.125,
 'figure.subplot.right': 0.90002,
 'figure.subplot.top': 0.90002,
 'figure.subplot.wspace': 0.20001,
 'font.cursive': ['Apple Chancery',
  'Textile',
  'Zapf Chancery',
  'Sand',
  'cursive'],
 'font.family': 'sans-serif',
 'font.fantasy': ['Comic Sans MS',
  'Chicago',
  'Charcoal',
  'ImpactWestern',
  'fantasy'],
 'font.monospace': ['Bitstream Vera Sans Mono',
'DejaVu Sans Mono',
'Andale Mono',
'Nimbus Mono L',
'Courier New',
'Courier',
'Fixed',
'Terminal',
'monospace'],
 'font.sans-serif': ['Bitstream Vera Sans',
 'DejaVu Sans',
 'Lucida Grande',
 'Verdana',
 'Geneva',
 'Lucid',
 'Arial',
 'Helvetica',
 'Avant Garde',
 'sans-serif'],
 'font.serif': ['Bitstream Vera Serif',
'DejaVu Serif',
'New Century Schoolbook',
'Century Schoolbook L',
'Utopia',
'ITC Bookman',
'Bookman',
'Nimbus Roman No9 L',
'Times New Roman',
'Times',
'Palatino',
'Charter',
'serif'],
 'font.size': 12.0,
 'font.stretch': 'normal',
 'font.style': 'normal',
 'font.variant': 'normal',
 'font.weight': 'normal',
 'grid.color': 'k',
 'grid.linestyle': ':',
 'grid.linewidth': 0.5,
 'image.aspect': 'equal',
 'image.cmap': 'jet',
 'image.interpolation': 'bilinear',
 'image.lut': 256,
 'image.origin': 'upper',
 'image.resample': False,
 'interactive': True,
 'legend.borderaxespad': 0.5,
 'legend.borderpad': 0.40002,
 'legend.columnspacing': 2.0,
 'legend.fancybox': False,
 'legend.fontsize': 'large',
 'legend.handlelength': 2.0,
 'legend.handletextpad': 0.80004,
 'legend.isaxes': True,
 'legend.labelspacing': 0.5,
 'legend.loc': 'upper right',
 'legend.markerscale': 1.0,
 'legend.numpoints': 2,
 'legend.shadow': False,
 'lines.antialiased': True,
 'lines.color': 'b',
 'lines.dash_capstyle': 'butt',
 'lines.dash_joinstyle': 'miter',
 'lines.linestyle': '-',
 'lines.linewidth': 1.0,
 'lines.marker': 'None',
 'lines.markeredgewidth': 0.5,
 'lines.markersize': 6,
 'lines.solid_capstyle': 'projecting',
 'lines.solid_joinstyle': 'miter',
 'maskedarray': 'obsolete',
 'mathtext.bf': 'serif:bold',
 'mathtext.cal': 'cursive',
 'mathtext.default': 'it',
 'mathtext.fallback_to_cm': True,
 'mathtext.fontset': 'cm',
 'mathtext.it': 'serif:italic',
 'mathtext.rm': 'serif',
 'mathtext.sf': 'sans\\-serif',
 'mathtext.tt': 'monospace',
 'numerix': 'numpy',
 'patch.antialiased': True,
 'patch.edgecolor': 'k',
 'patch.facecolor': 'b',
 'patch.linewidth': 1.0,
 'path.simplify': True,
 'pdf.compression': 6,
 'pdf.fonttype': 3,
 'pdf.inheritcolor': False,
 'pdf.use14corefonts': False,
 'plugins.directory': '.matplotlib_plugins',
 'polaraxes.grid': True,
 'ps.distiller.res': 6000,
 'ps.fonttype': 3,
 'ps.papersize': 'letter',
 'ps.useafm': False,
 'ps.usedistiller': 'xpdf',
 'savefig.dpi': 100,
 'savefig.edgecolor': 'w',
 'savefig.facecolor': 'w',
 'savefig.orientation': 'portrait',
 'svg.embed_char_paths': True,
 'svg.image_inline': True,
 'svg.image_noscale': False,
 'text.color': 'k',
 

Re: [Matplotlib-users] All CM fonts

2009-01-12 Thread Jouni K . Seppänen
T J tjhn...@gmail.com writes:

 So it looks as if the plot title, for example, is getting Nimbus
 rather than CM.  

The usetex code looks at the font settings in your rc file and chooses
the first matching font that it knows how to use in TeX. Your settings
(probably inherited from the defaults) specify choosing a font in the
sans serif family:

  'font.family': 'sans-serif',

and of those, Helvetica happens to be the first one in this list that it
knows about:

  'font.sans-serif': ['Bitstream Vera Sans',
[...]
  'Helvetica',

You see Nimbus Sans in the output because that's a free Helvetica
look-alike included by your TeX distribution.

 What is the 'proper' way to get all the fonts to match my document?

Specify Computer Modern fonts in your rc file:

font.sans-serif: Computer Modern Sans Serif
font.serif:  Computer Modern Roman
font.monospace:  Computer Modern Typewriter

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users