Hello everybody!

I am experiencing the following problem: when I draw text with usetex
enabled and the xcolor package, the result is not colored; however the
intermediate steps that I find in .../tex.cache still are!


The problem occurs with:

=====
from matplotlib import rc
from pylab import figure, text, show, savefig

rc('text', usetex=True)
rc('text.latex', preamble="\usepackage{xcolor}")

f = figure()
f.text(0.5,0.5,r"{\color[rgb]{0,1,0}a}b")

show()
#savefig("colortest.png")
=====


The resulting graph is not colored -- but in the directory
~/.matplotlib/tex.cache/ the text is green, both in the dvi and the png
file!

It therefore seems to me that this is not completely hopeless but I
cannot figure out how to proceed.

Can someone help?
Thanks & best regards,
Sebastian.


I am on
Linux macbook 2.6.27-11-generic #1 SMP Wed Apr 1 20:53:41 UTC 2009
x86_64 GNU/Linux
running
Python 2.5.2 (r252:60911, Oct  5 2008, 19:29:17)
and
matplotlib 0.98.3
downloaded from the Ubuntu repositories for 8.10.


I ran
> python colortest.py --verbose-helpful

/usr/lib/python2.5/site-packages/pytz/__init__.py:29: UserWarning:
Module dateutil was already imported from
/var/lib/python-support/python2.5/dateutil/__init__.py, but
/var/lib/python-support/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
$HOME=/...
CONFIGDIR=/.../.matplotlib
matplotlib data path /usr/share/matplotlib/mpl-data
loaded rc file /etc/matplotlibrc
matplotlib version 0.98.3
verbose.level helpful
interactive is False
units is False
platform is linux2
Using fontManager instance from /home/buschi/.matplotlib/fontManager.cache
backend TkAgg version 8.4
Found dvipng version 1.11


and
> python colortest.py --verbose-debug

/usr/lib/python2.5/site-packages/pytz/__init__.py:29: UserWarning:
Module dateutil was already imported from
/var/lib/python-support/python2.5/dateutil/__init__.py, but
/var/lib/python-support/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
$HOME=/...
CONFIGDIR=/.../.matplotlib
matplotlib data path /usr/share/matplotlib/mpl-data
loaded rc file /etc/matplotlibrc
matplotlib version 0.98.3
verbose.level debug
interactive is False
units is False
platform is linux2
loaded modules: ['numpy.lib.pkgutil', 'numpy.lib.tempfile',
'numpy.ma.types', 'xml.sax.urlparse', 'distutils', 'matplotlib.errno',
'matplotlib.matplotlib', '_bisect', 'numpy.core.defchararray',
'numpy.lib.bz2', 'matplotlib.tempfile', 'distutils.sysconfig',
'ctypes._endian', 'encodings.encodings', 'matplotlib.dateutil',
'matplotlib.colors', 'numpy.core.numerictypes', 'numpy.testing.sys',
'numpy.core.info', 'xml', 'numpy.fft.types', 'numpy.ma.operator',
'distutils.dep_util', 'numpy.ma.cPickle', 'struct', 'numpy.random.info',
'tempfile', 'mmap', 'xml.sax.urllib', 'numpy.linalg',
'matplotlib.threading', 'numpy.testing.operator', 'imp', 'compiler.sys',
'collections', 'compiler.pyassem', 'numpy.core.umath', '_struct',
'unittest', 'compiler.new', 'numpy.lib.numpy', 'numpy.testing.types',
'compiler.ast', 'numpy.ma.sys', 'zipimport', 'string',
'numpy.testing.os', 'matplotlib.locale', 'numpy.lib.arraysetops',
'numpy.testing.unittest', 'numpy.lib.inspect', 'encodings.utf_8',
'matplotlib.__future__', 'pytz.tzinfo', 'numpy.ctypeslib',
'numpy.testing.re', 'itertools', 'numpy.version', 'numpy.lib.re',
'distutils.re', 'ctypes.os', 'compiler.token', 'numpy.core.os',
'compiler', 'numpy.lib.type_check', 'httplib', 'bisect', 'signal',
'compiler.consts', 'numpy.lib._datasource', 'random', 'numpy.ma.extras',
'token', 'numpy.fft.fftpack_lite', 'shlex', 'ctypes.ctypes',
'xml.sax.xmlreader', 'matplotlib.pytz', 'numpy.__builtin__',
'numpy.testing.shlex', 'distutils.log', 'dis', 'numpy.lib.itertools',
'cStringIO', 'zlib', 'numpy.numpy', 'matplotlib.StringIO',
'numpy.random.mtrand', 'numpy.add_newdocs', 'numpy.lib.getlimits',
'compiler.dis', 'compiler.transformer', 'xml.sax.saxutils',
'compiler.struct', 'pkgutil', 'compiler.parser', 'numpy.lib.sys',
'encodings', 'compiler.symbol', 'numpy.lib.io', 'StringIO', 'dateutil',
'pydoc', 'pytz.cStringIO', 'numpy.imp', 'numpy.ctypes',
'matplotlib.warnings', 'rfc822', 'matplotlib.string', 'pytz.pytz',
'urllib', 'matplotlib.sys', 're', 'numpy.lib._compiled_base',
'threading', 'numpy.core.mmap', 'new', 'numpy.lib.struct', 'symbol',
'math', 'numpy.fft.helper', 'fcntl', 'numpy.ma.warnings',
'compiler.imp', 'UserDict', 'inspect', 'distutils.os', 'matplotlib',
'urllib2', 'pytz.os', 'fnmatch', 'numpy.lib.info', 'numpy.testing',
'numpy.testing.glob', 'numpy.lib.warnings', 'ctypes.struct', 'codecs',
'numpy.core._sort', 'numpy.os', 'pytz.bisect', 'compiler.visitor',
'md5', 'numpy.testing.difflib', 'matplotlib.sre_constants',
'matplotlib.os', 'thread', 'numpy.lib.ufunclike', 'numpy.core.memmap',
'traceback', 'pkg_resources', 'numpy.testing.warnings', 'weakref',
'numpy.core._internal', 'numpy.fft.fftpack', 'opcode',
'numpy.core.scalarmath', 'numpy.linalg.lapack_lite', 'ctypes',
'distutils.sys', 'os', 'marshal', 'sre_parse', 'numpy.lib.shutil',
'__future__', 'numpy.core.string', 'matplotlib.copy', 'xml.sax.types',
'numpy.random.numpy', '_sre', 'numpy.lib.gzip', 'numpy.core.sys',
'numpy.random', 'numpy.linalg.numpy', '__builtin__',
'numpy.lib.twodim_base', 'numpy.ma.core', 'matplotlib.re',
'numpy.core.cPickle', 'base64', 'operator', 'numpy.testing.parametric',
'numpy.core.arrayprint', 'distutils.string', 'ctypes._ctypes', '_heapq',
'ctypes.sys', 'matplotlib.datetime', 'posixpath', 'numpy.lib.financial',
'numpy.core.multiarray', 'errno', 'numpy.testing.numpy', '_socket',
'binascii', 'numpy.lib.compiler', 'sre_constants', 'compiler.cStringIO',
'locale', 'compiler.os', 'matplotlib.md5', 'types', 'pytz.sys',
'tokenize', 'xml.sax.handler', 'numpy.core.numpy', 'numpy',
'numpy.lib.urlparse', 'pytz.pkg_resources', 'matplotlib.types',
'numpy.core.defmatrix', 'xml.sax.os', 'cPickle', 'matplotlib.xml',
'_codecs', '_locale', 'matplotlib.traceback', 'numpy.__config__',
'numpy.fft.info', 'numpy.lib.types', 'pytz', 'matplotlib.pyparsing',
'compiler.copy_reg', 'numpy.ma.numpy', 'copy', 'numpy.core.re',
'socket', '_types', 'numpy.core.fromnumeric', 'hashlib',
'compiler.future', 'matplotlib.cbook', 'numpy.core.copy_reg',
'numpy.lib.scimath', 'numpy.fft', 'numpy.lib', '_ctypes',
'apport_python_hook', 'posix', 'encodings.aliases',
'matplotlib.fontconfig_pattern', 'exceptions', 'xml.sax._exceptions',
'datetime', 'sets', 'numpy.core.cStringIO', 'numpy.core.ctypes',
'mimetools', 'distutils.distutils', 'copy_reg', 'sre_compile',
'xml.sax', 'compiler.compiler', '_hashlib', '_random', 'parser', 'site',
'numpy.lib.polynomial', 'numpy._import_tools', 'numpy.glob',
'pytz.struct', 'numpy.lib.time', '__main__', 'compiler.misc',
'numpy.core.records', 'shutil', 'numpy.lib.cPickle', 'numpy.sys',
'matplotlib.weakref', 'numpy.lib.pydoc', 'numpy.core._dotblas',
'numpy.testing.traceback', 'strop', 'compiler.pycodegen',
'numpy.core.numeric', 'pytz.tzfile', 'numpy.linalg.info',
'encodings.codecs', 'gettext', 'pytz.datetime', 'heapq',
'numpy.lib.cStringIO', 'numpy.core', 'numpy.testing.info',
'matplotlib.rcsetup', 'matplotlib.time', 'pytz.sets',
'matplotlib.numpy', 'xml.sax.codecs', 'stat', '_ssl', 'numpy.lib.utils',
'numpy.lib.index_tricks', 'numpy.testing.utils', 'warnings',
'encodings.types', 'numpy.lib.math', 'glob', 'numpy.lib.shape_base',
'distutils.util', 'numpy.core.types', 'numpy.fft.numpy', 'repr', 'sys',
'numpy.core.warnings', 'numpy.lib.urllib2', 'compiler.types',
'numpy.core.__builtin__', 'xml.sax.sys', 'numpy.lib.format',
'numpy.lib.os', 'numpy.ma', 'os.path', 'bz2', 'pytz.gettext',
'sitecustomize', 'compiler.symbols', 'distutils.spawn',
'matplotlib.distutils', '_weakref', 'numpy.testing.numpytest',
'difflib', 'distutils.errors', 'urlparse', 'linecache',
'matplotlib.shutil', 'numpy.lib.function_base', 'numpy.testing.imp',
'time', 'gzip', 'numpy.lib.machar', 'compiler.marshal',
'numpy.linalg.linalg', 'compiler.syntax']
Using fontManager instance from /home/buschi/.matplotlib/fontManager.cache
backend TkAgg version 8.4
        findfont found Bitstream Vera Sans, normal, normal 400, normal, 12.0
findfont returning /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf
Found dvipng version 1.11


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to