|
From: Rob H. <he...@ta...> - 2007-12-03 12:51:38
|
I was working on a figure, using mathtext and the Arev Sans fontset,
and I noticed that \Delta does not display correctly. In fact, none
of the capitol greek letters show up. It claims they are missing
(and I do not default back to CM). However, I _know_ Arev Sans has
\Delta (and the others).
Little \delta and all the other little greek letters are there:
>>> text(0.5, 0.5, r'$\Delta$')
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/matplotlib/mathtext.py:808: MathTextWarning: Font
'BitstreamVeraSerif-Roman' does not have a glyph for '\Delta'
MathTextWarning)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/matplotlib/mathtext.py:817: MathTextWarning: Substituting
with a dummy symbol.
warn("Substituting with a dummy symbol.", MathTextWarning)
<matplotlib.text.Text instance at 0x476f8f30>
>>> text(0.5, 0.5, r'$\alpha \beta \gamma \delta \nu \eta \zeta \pi
\xi$')
<matplotlib.text.Text instance at 0x478a6e18>
Am I doing something wrong?
-Rob
----
Rob Hetland, Associate Professor
Dept. of Oceanography, Texas A&M University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331
|
|
From: Michael D. <md...@st...> - 2007-12-03 13:03:29
|
The log shows that for some reason it is pulling in
BitstreamVeraSerif-Roman instead of Arev Sans for that character. It
could be that it isn't finding the Arev fonts on your system.
Can you send your matplotlibrc file? (Particularly the mathtext.*
options...) Also, can you set "verbose.level" to "debug-annoying" and
send us the output?
Cheers,
Mike
Rob Hetland wrote:
>
> I was working on a figure, using mathtext and the Arev Sans fontset, and
> I noticed that \Delta does not display correctly. In fact, none of the
> capitol greek letters show up. It claims they are missing (and I do not
> default back to CM). However, I _know_ Arev Sans has \Delta (and the
> others).
>
> Little \delta and all the other little greek letters are there:
>
> >>> text(0.5, 0.5, r'$\Delta$')
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py:808:
> MathTextWarning: Font 'BitstreamVeraSerif-Roman' does not have a glyph
> for '\Delta'
> MathTextWarning)
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py:817:
> MathTextWarning: Substituting with a dummy symbol.
> warn("Substituting with a dummy symbol.", MathTextWarning)
> <matplotlib.text.Text instance at 0x476f8f30>
> >>> text(0.5, 0.5, r'$\alpha \beta \gamma \delta \nu \eta \zeta \pi \xi$')
> <matplotlib.text.Text instance at 0x478a6e18>
>
>
> Am I doing something wrong?
>
> -Rob
>
>
> ----
> Rob Hetland, Associate Professor
> Dept. of Oceanography, Texas A&M University
> http://pong.tamu.edu/~rob
> phone: 979-458-0096, fax: 979-845-6331
>
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: Rob H. <he...@ta...> - 2007-12-03 13:12:07
|
On Dec 3, 2007, at 2:02 PM, Michael Droettboom wrote:
> Can you send your matplotlibrc file? (Particularly the mathtext.*
> options...) Also, can you set "verbose.level" to "debug-annoying"
> and send us the output?
It seems to me that Arev is being used from the debug information.
See the log below.
-Rob
matplotlib data path /Library/Frameworks/Python.framework/Versions/
2.5/lib/python2.5/site-packages/matplotlib/mpl-data
loaded rc file /Users/rob/.matplotlib/matplotlibrc
matplotlib version 0.91.0
verbose.level debug-annoying
interactive is True
units is False
platform is darwin
loaded modules: ['IPython.Prompts', 'IPython.pickleshare', 'heapq',
'xml.sax.urlparse', '_sha512', 'IPython.iplib', 'IPython.signal',
'random', '_bisect', 'ctypes.os', 'IPython.wildcard', 'gettext',
'IPython.bdb', 'distutils.sysconfig', 'ctypes._endian',
'encodings.encodings', 'IPython.fnmatch', 'IPython.time', '_lsprof',
'xml', 'struct', 'tempfile', 'pprint', 'IPython.doctest',
'IPython.copy_reg', 'imp', 'IPython.OInspect', 'IPython.warnings',
'collections', 'IPython.pydoc', 'cProfile', 'IPython.cStringIO',
'IPython.Shell', 'IPython.rlineimpl', 'zipimport', 'string',
'xml.sax.types', 'matplotlib.dateutil', 'encodings.utf_8',
'matplotlib.__future__', 'IPython.thread', 'datetime',
'IPython.Itpl', 'IPython.Debugger', 'new', 'distutils.re',
'IPython.excolors', 'IPython.Queue', 'IPython.os', 'resource',
'bisect', 'IPython.glob', 'signal', 'cmd', 'pydoc', 'threading',
'token', 'IPython.ctypes', 'shlex', 'IPython.shlex',
'xml.sax.xmlreader', 'matplotlib.pytz', 'IPython.exceptions',
'IPython.new', 'dis', 'cStringIO', 'pkgutil',
'IPython.external.simplegeneric', 'IPython.platutils_posix',
'IPython.path', 'IPython.types', 'IPython', 'IPython.external',
'IPython.commands', 'matplotlib.matplotlib', 'encodings',
'IPython.threading', 'bdb', 'IPython.ConfigLoader',
'matplotlib.warnings', 'matplotlib.string', 'urllib', 'IPython.pdb',
're', 'posix', 'IPython.shadowns', 'math', 'fcntl', 'pytz.tzinfo',
'dateutil', 'optparse', 'UserDict', 'inspect', 'IPython.hooks',
'distutils.os', '_ctypes', 'Queue', 'fnmatch', 'ctypes',
'IPython.generics', 'ctypes.struct', 'codecs', 'matplotlib.sys',
'path', 'pickleshare', 'pytz.bisect', 'md5', 'IPython.ColorANSI',
'commands', 'matplotlib.sre_constants', 'socket', 'thread',
'StringIO', 'IPython.StringIO', 'traceback', 'IPython.pstats',
'weakref', 'itertools', 'opcode', 'doctest', 'IPython.history',
'pstats', 'IPython.tokenize', 'distutils.sys', 'os', 'pdb',
'IPython.traceback', '__future__', 'matplotlib.copy',
'distutils.distutils', '_sre', 'unittest', 'IPython.ipmaker',
'__builtin__', 'matplotlib.re', 'operator', 'distutils.string',
'ctypes._ctypes', '_heapq', 'ctypes.sys', 'matplotlib.datetime',
'IPython.codeop', 'posixpath', 'errno', '_socket', 'binascii',
'IPython.sys', 'IPython.re', 'sre_constants', 'IPython.cProfile',
'_sha256', 'IPython.PyColorize', 'matplotlib.md5', 'types',
'IPython.genutils', 'tokenize', 'gestalt', 'matplotlib.tempfile',
'textwrap', 'IPython.strdispatch', 'cPickle', 'pytz.sys',
'IPython.platutils', 'matplotlib.xml', 'IPython.macro', '_codecs',
'IPython.token', '_locale', 'IPython.keyword', 'IPython.IPython',
'IPython.string', 'pytz', 'matplotlib.pyparsing',
'IPython.__builtin__', 'copy', 'pwd', '_struct', '_types',
'IPython.socket', 'hashlib', 'IPython.resource', 'IPython.cmd',
'keyword', 'atexit', 'distutils', 'IPython.linecache',
'xml.sax.saxutils', 'IPython.optparse', 'IPython.__main__',
'encodings.aliases', 'matplotlib.fontconfig_pattern', 'exceptions',
'sre_parse', 'IPython.ultraTB', 'IPython.prefilter',
'IPython.tempfile', 'IPython.Release', 'IPython.OutputTrap',
'copy_reg', 'sre_compile', 'xml.sax', 'xml.sax.os', '_hashlib',
'_random', 'site', 'IPython.sets', 'IPython.getopt',
'IPython.ipstruct', 'IPython.external.types', 'IPython.inspect',
'__main__', 'locale', 'shutil', 'IPython.Magic', 'IPython.pprint',
'urlparse', 'xml.sax.urllib', 'matplotlib.os', 'strop',
'IPython.bisect', 'xml.sax.handler', 'IPython.textwrap',
'xml.sax.codecs', 'IPython.shutil', 'encodings.codecs',
'ctypes.gestalt', 'pytz.datetime', 'IPython.Logger',
'matplotlib.rcsetup', 'getopt', 'matplotlib.weakref', 'pytz.sets',
'xml.sax._exceptions', 'IPython.readline', 'stat', '_ssl',
'warnings', 'encodings.types', 'glob', 'sets', 'repr', 'sys',
'ctypes.ctypes', 'codeop', 'readline', 'os.path',
'IPython.background_jobs', 'IPython.DPyGetOpt', 'IPython.cPickle',
'xml.sax.sys', 'IPython.usage', 'matplotlib.distutils', '_weakref',
'difflib', 'distutils.errors', 'marshal', 'matplotlib', 'linecache',
'matplotlib.shutil', 'time', 'IPython.FakeModule', 'IPython.ipapi']
numerix numpy 1.0.5.dev4407
$HOME=/Users/rob
CONFIGDIR=/Users/rob/.matplotlib
Using fontManager instance from /Users/rob/.matplotlib/fontManager.cache
backend WXAgg version 2.8.6.1
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
Type "copyright", "credits" or "license" for more information.
IPython 0.8.2.svn.r2848 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
Welcome to pylab, a matplotlib-based Python environment.
For more information, type 'help(pylab)'.
>>> text(0.5, 0.6, u'$\Delta$')
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=640.0, height=440.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
RendererAgg.buffer_rgba
FigureCanvasAgg.draw
RendererAgg.buffer_rgba
FigureCanvasAgg.draw
RendererAgg._get_agg_font
findfont found Arev Sans, normal, normal 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
findfont found Arev Sans, oblique, normal 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/ArevIt.ttf
findfont failed STIX
findfont found Bitstream Vera Serif, normal, normal 500,
normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/VeraSe.ttf
findfont found Bitstream Vera Sans Mono, normal, normal 500,
normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/VeraMono.ttf
findfont found Arev Sans, oblique, normal 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/ArevIt.ttf
findfont found Arev Sans, normal, normal 700, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/ArevBd.ttf
findfont cached Arev Sans, normal, normal, 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
findfont found cmex10, normal, normal 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmex10.ttf
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/matplotlib/mathtext.py:808: MathTextWarning: Font
'BitstreamVeraSerif-Roman' does not have a glyph for '\Delta'
MathTextWarning)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/matplotlib/mathtext.py:817: MathTextWarning: Substituting
with a dummy symbol.
warn("Substituting with a dummy symbol.", MathTextWarning)
RendererAgg.draw_text
RendererAgg.draw_mathtext
RendererAgg.buffer_rgba
<matplotlib.text.Text instance at 0x1b01f8f0>
>>> FigureCanvasAgg.draw
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg.draw_mathtext
RendererAgg.buffer_rgba
----
Rob Hetland, Associate Professor
Dept. of Oceanography, Texas A&M University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331
|
|
From: Michael D. <md...@st...> - 2007-12-03 13:26:21
|
The line I'm referring to is this --->
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py:808:
MathTextWarning: Font 'BitstreamVeraSerif-Roman' does not have a glyph
for '\Delta'
MathTextWarning)
Can you send your matplotlibrc settings and the mathtext expression you
are using? One or the other of those is causing Vera Serif to be used
for the \Delta character rather than Arev Sans.
Cheers,
Mike
Rob Hetland wrote:
>
> On Dec 3, 2007, at 2:02 PM, Michael Droettboom wrote:
>
>> Can you send your matplotlibrc file? (Particularly the mathtext.*
>> options...) Also, can you set "verbose.level" to "debug-annoying" and
>> send us the output?
>
> It seems to me that Arev is being used from the debug information. See
> the log below.
>
> -Rob
>
>
>
> matplotlib data path
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data
>
> loaded rc file /Users/rob/.matplotlib/matplotlibrc
> matplotlib version 0.91.0
> verbose.level debug-annoying
> interactive is True
> units is False
> platform is darwin
> loaded modules: ['IPython.Prompts', 'IPython.pickleshare', 'heapq',
> 'xml.sax.urlparse', '_sha512', 'IPython.iplib', 'IPython.signal',
> 'random', '_bisect', 'ctypes.os', 'IPython.wildcard', 'gettext',
> 'IPython.bdb', 'distutils.sysconfig', 'ctypes._endian',
> 'encodings.encodings', 'IPython.fnmatch', 'IPython.time', '_lsprof',
> 'xml', 'struct', 'tempfile', 'pprint', 'IPython.doctest',
> 'IPython.copy_reg', 'imp', 'IPython.OInspect', 'IPython.warnings',
> 'collections', 'IPython.pydoc', 'cProfile', 'IPython.cStringIO',
> 'IPython.Shell', 'IPython.rlineimpl', 'zipimport', 'string',
> 'xml.sax.types', 'matplotlib.dateutil', 'encodings.utf_8',
> 'matplotlib.__future__', 'IPython.thread', 'datetime', 'IPython.Itpl',
> 'IPython.Debugger', 'new', 'distutils.re', 'IPython.excolors',
> 'IPython.Queue', 'IPython.os', 'resource', 'bisect', 'IPython.glob',
> 'signal', 'cmd', 'pydoc', 'threading', 'token', 'IPython.ctypes',
> 'shlex', 'IPython.shlex', 'xml.sax.xmlreader', 'matplotlib.pytz',
> 'IPython.exceptions', 'IPython.new', 'dis', 'cStringIO', 'pkgutil',
> 'IPython.external.simplegeneric', 'IPython.platutils_posix',
> 'IPython.path', 'IPython.types', 'IPython', 'IPython.external',
> 'IPython.commands', 'matplotlib.matplotlib', 'encodings',
> 'IPython.threading', 'bdb', 'IPython.ConfigLoader',
> 'matplotlib.warnings', 'matplotlib.string', 'urllib', 'IPython.pdb',
> 're', 'posix', 'IPython.shadowns', 'math', 'fcntl', 'pytz.tzinfo',
> 'dateutil', 'optparse', 'UserDict', 'inspect', 'IPython.hooks',
> 'distutils.os', '_ctypes', 'Queue', 'fnmatch', 'ctypes',
> 'IPython.generics', 'ctypes.struct', 'codecs', 'matplotlib.sys', 'path',
> 'pickleshare', 'pytz.bisect', 'md5', 'IPython.ColorANSI', 'commands',
> 'matplotlib.sre_constants', 'socket', 'thread', 'StringIO',
> 'IPython.StringIO', 'traceback', 'IPython.pstats', 'weakref',
> 'itertools', 'opcode', 'doctest', 'IPython.history', 'pstats',
> 'IPython.tokenize', 'distutils.sys', 'os', 'pdb', 'IPython.traceback',
> '__future__', 'matplotlib.copy', 'distutils.distutils', '_sre',
> 'unittest', 'IPython.ipmaker', '__builtin__', 'matplotlib.re',
> 'operator', 'distutils.string', 'ctypes._ctypes', '_heapq',
> 'ctypes.sys', 'matplotlib.datetime', 'IPython.codeop', 'posixpath',
> 'errno', '_socket', 'binascii', 'IPython.sys', 'IPython.re',
> 'sre_constants', 'IPython.cProfile', '_sha256', 'IPython.PyColorize',
> 'matplotlib.md5', 'types', 'IPython.genutils', 'tokenize', 'gestalt',
> 'matplotlib.tempfile', 'textwrap', 'IPython.strdispatch', 'cPickle',
> 'pytz.sys', 'IPython.platutils', 'matplotlib.xml', 'IPython.macro',
> '_codecs', 'IPython.token', '_locale', 'IPython.keyword',
> 'IPython.IPython', 'IPython.string', 'pytz', 'matplotlib.pyparsing',
> 'IPython.__builtin__', 'copy', 'pwd', '_struct', '_types',
> 'IPython.socket', 'hashlib', 'IPython.resource', 'IPython.cmd',
> 'keyword', 'atexit', 'distutils', 'IPython.linecache',
> 'xml.sax.saxutils', 'IPython.optparse', 'IPython.__main__',
> 'encodings.aliases', 'matplotlib.fontconfig_pattern', 'exceptions',
> 'sre_parse', 'IPython.ultraTB', 'IPython.prefilter', 'IPython.tempfile',
> 'IPython.Release', 'IPython.OutputTrap', 'copy_reg', 'sre_compile',
> 'xml.sax', 'xml.sax.os', '_hashlib', '_random', 'site', 'IPython.sets',
> 'IPython.getopt', 'IPython.ipstruct', 'IPython.external.types',
> 'IPython.inspect', '__main__', 'locale', 'shutil', 'IPython.Magic',
> 'IPython.pprint', 'urlparse', 'xml.sax.urllib', 'matplotlib.os',
> 'strop', 'IPython.bisect', 'xml.sax.handler', 'IPython.textwrap',
> 'xml.sax.codecs', 'IPython.shutil', 'encodings.codecs',
> 'ctypes.gestalt', 'pytz.datetime', 'IPython.Logger',
> 'matplotlib.rcsetup', 'getopt', 'matplotlib.weakref', 'pytz.sets',
> 'xml.sax._exceptions', 'IPython.readline', 'stat', '_ssl', 'warnings',
> 'encodings.types', 'glob', 'sets', 'repr', 'sys', 'ctypes.ctypes',
> 'codeop', 'readline', 'os.path', 'IPython.background_jobs',
> 'IPython.DPyGetOpt', 'IPython.cPickle', 'xml.sax.sys', 'IPython.usage',
> 'matplotlib.distutils', '_weakref', 'difflib', 'distutils.errors',
> 'marshal', 'matplotlib', 'linecache', 'matplotlib.shutil', 'time',
> 'IPython.FakeModule', 'IPython.ipapi']
> numerix numpy 1.0.5.dev4407
> $HOME=/Users/rob
> CONFIGDIR=/Users/rob/.matplotlib
> Using fontManager instance from /Users/rob/.matplotlib/fontManager.cache
> backend WXAgg version 2.8.6.1
> Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.8.2.svn.r2848 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints more.
>
> Welcome to pylab, a matplotlib-based Python environment.
> For more information, type 'help(pylab)'.
> >>> text(0.5, 0.6, u'$\Delta$')
> FigureCanvasAgg.draw
> RendererAgg.__init__
> RendererAgg.__init__ width=640.0, height=440.0
> RendererAgg.__init__ _RendererAgg done
> RendererAgg.__init__ done
> RendererAgg.buffer_rgba
> FigureCanvasAgg.draw
> RendererAgg.buffer_rgba
> FigureCanvasAgg.draw
> RendererAgg._get_agg_font
> findfont found Arev Sans, normal, normal 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> findfont found Arev Sans, oblique, normal 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/ArevIt.ttf
>
> findfont failed STIX
> findfont found Bitstream Vera Serif, normal, normal 500, normal,
> 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/VeraSe.ttf
>
> findfont found Bitstream Vera Sans Mono, normal, normal 500,
> normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/VeraMono.ttf
>
> findfont found Arev Sans, oblique, normal 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/ArevIt.ttf
>
> findfont found Arev Sans, normal, normal 700, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/ArevBd.ttf
>
> findfont cached Arev Sans, normal, normal, 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/Arev.ttf
>
> findfont found cmex10, normal, normal 500, normal, 12.0
> findfont returning
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmex10.ttf
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py:808:
> MathTextWarning: Font 'BitstreamVeraSerif-Roman' does not have a glyph
> for '\Delta'
> MathTextWarning)
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py:817:
> MathTextWarning: Substituting with a dummy symbol.
> warn("Substituting with a dummy symbol.", MathTextWarning)
> RendererAgg.draw_text
> RendererAgg.draw_mathtext
> RendererAgg.buffer_rgba
> <matplotlib.text.Text instance at 0x1b01f8f0>
> >>> FigureCanvasAgg.draw
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg.draw_mathtext
> RendererAgg.buffer_rgba
>
>
> ----
> Rob Hetland, Associate Professor
> Dept. of Oceanography, Texas A&M University
> http://pong.tamu.edu/~rob
> phone: 979-458-0096, fax: 979-845-6331
>
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: Rob H. <he...@ta...> - 2007-12-03 13:39:59
|
On Dec 3, 2007, at 2:26 PM, Michael Droettboom wrote: > Can you send your matplotlibrc settings and the mathtext expression > you are using? One or the other of those is causing Vera Serif to > be used for the \Delta character rather than Arev Sans. I get this error anytime I try to get a delta. E.g.: text(0.5, 0.5, r'$\Delta$) (I think this is what you mean by mathtext expresssion?) Here is the relevant part of the matplotlibrc file: font.family : sans-serif font.style : normal font.variant : normal font.weight : medium font.stretch : normal # note that font.size controls default text sizes. To configure # special text sizes tick labels, axes, labels, title, etc, see the rc # settings for axes and ticks. Special text sizes can be defined # relative to font.size, using the following values: xx-small, x-small, # small, medium, large, x-large, xx-large, larger, or smaller font.size : 12.0 font.serif : STIX, Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif font.sans-serif : Arev Sans #, Lucida Grande, Helvetica, Verdana, Geneva, Lucid, Avant Garde, sans-serif font.cursive : Zapfino, Apple Chancery, Textile, Sand, cursive font.fantasy : Chicago, Comic Sans MS, Charcoal, Impact, Western, fantasy font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace text.color : black text.usetex : False text.dvipnghack : True ### MATHTEXT mathtext.fallback_to_cm : False mathtext.cal : sans:oblique mathtext.it : sans:oblique mathtext.rm : serif mathtext.bf : sans:bold mathtext.sf : sans # mathtext.fontset : stixsans mathtext.fontset : custom # for arev sans pdf.fonttype : 42 # pdf.use14corefonts : True # ps.fonttype : 42 # ps.useafm : True ---- Rob Hetland, Associate Professor Dept. of Oceanography, Texas A&M University http://pong.tamu.edu/~rob phone: 979-458-0096, fax: 979-845-6331 |
|
From: Michael D. <md...@st...> - 2007-12-03 13:54:00
|
I see what's going on here. Upper-case Greek letters are always upright (non-italic) in mathtext. TeX does this, and it is apparently a long standing American typographic convention. So, when it goes to print the "\Delta", it looks at "mathtext.rm", which in your case you have set to "serif", which causes it to look at the setting for "font.serif", in which the first font it finds is "Bitstream Vera Serif", which doesn't have Greek characters. Personally, I like to set the math fonts explicitly, rather than using the font categories. This is what I set for using Arev Sans: mathtext.cal : Arev Sans:oblique mathtext.it : Arev Sans:oblique mathtext.rm : Arev Sans mathtext.bf : Arev Sans:bold mathtext.sf : Arev Sans I may consider adding "arev" and "arevsans" values to "mathtext.fontset" that would do nothing more than set the "mathtext.*" values to reasonable defaults to avoid this confusion. (Which would of course require that the Arev fonts are available -- they aren't included with matplotlib). I still think it's useful and reasonable to provide access to full font customization, but it would be nice to support the common case in a more direct way. Hope that helps. Cheers, Mike Rob Hetland wrote: > > On Dec 3, 2007, at 2:26 PM, Michael Droettboom wrote: > >> Can you send your matplotlibrc settings and the mathtext expression >> you are using? One or the other of those is causing Vera Serif to be >> used for the \Delta character rather than Arev Sans. > > > I get this error anytime I try to get a delta. E.g.: > > text(0.5, 0.5, r'$\Delta$) > > (I think this is what you mean by mathtext expresssion?) Here is the > relevant part of the matplotlibrc file: > > > font.family : sans-serif > font.style : normal > font.variant : normal > font.weight : medium > font.stretch : normal > # note that font.size controls default text sizes. To configure > # special text sizes tick labels, axes, labels, title, etc, see the rc > # settings for axes and ticks. Special text sizes can be defined > # relative to font.size, using the following values: xx-small, x-small, > # small, medium, large, x-large, xx-large, larger, or smaller > font.size : 12.0 > font.serif : STIX, Bitstream Vera Serif, New Century > Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus > Roman No9 L, Times New Roman, Times, Palatino, Charter, serif > font.sans-serif : Arev Sans > #, Lucida Grande, Helvetica, Verdana, Geneva, Lucid, Avant Garde, > sans-serif > font.cursive : Zapfino, Apple Chancery, Textile, Sand, cursive > font.fantasy : Chicago, Comic Sans MS, Charcoal, Impact, Western, > fantasy > font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono > L, Courier New, Courier, Fixed, Terminal, monospace > > text.color : black > text.usetex : False > text.dvipnghack : True > > ### MATHTEXT > mathtext.fallback_to_cm : False > mathtext.cal : sans:oblique > mathtext.it : sans:oblique > mathtext.rm : serif > mathtext.bf : sans:bold > mathtext.sf : sans > # mathtext.fontset : stixsans > mathtext.fontset : custom # for arev sans > > pdf.fonttype : 42 > > # pdf.use14corefonts : True > # ps.fonttype : 42 > # ps.useafm : True > > > > > ---- > Rob Hetland, Associate Professor > Dept. of Oceanography, Texas A&M University > http://pong.tamu.edu/~rob > phone: 979-458-0096, fax: 979-845-6331 > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Rob H. <he...@ta...> - 2007-12-03 14:13:37
|
On Dec 3, 2007, at 2:53 PM, Michael Droettboom wrote: > Personally, I like to set the math fonts explicitly, rather than > using the font categories. This is what I set for using Arev Sans: > > mathtext.cal : Arev Sans:oblique > mathtext.it : Arev Sans:oblique > mathtext.rm : Arev Sans > mathtext.bf : Arev Sans:bold > mathtext.sf : Arev Sans Ah, yes. This makes sense now. I used to have my fonts set up this way, but then changed them based on one of the newer matplotlibrc.default files. Now I changed it back, and things work fine. -Rob ---- Rob Hetland, Associate Professor Dept. of Oceanography, Texas A&M University http://pong.tamu.edu/~rob phone: 979-458-0096, fax: 979-845-6331 |