On Tuesday 02 March 2010 22:24:30 Heiko Bauke wrote:
> Hi,
>
> I use the text.latex.preamble rc setting to customize my plots.
> Everything works fine. However, a comma in this rc setting is
> interpreted as a new-line, thus, I wonder how can I create a LaTeX
> preamble that contains a comma? The statement
>
> matplotlib.rcParams['text.latex.preamble']=r"\usepackage[garamond,sfscaled=
>false]{mathdesign}"
>
> will produce a preamble with the two lines
>
> \usepackage[garamond
> sfscaled=false]{mathdesign}
>
> Which is not what I desire.
Hi Heiko,
in the matplotlibrc I read:
#text.latex.preamble :
# IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES
# AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP
# IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO.
# preamble is a comma separated list of LaTeX statements
# that are included in the LaTeX document preamble.
Therefore it is assumed (in the rcsetup.py) that the given string needs to be
devided into sub-strings, which are separated by commas. For your particular
case - in my opinion - the solution is to provide a list of string(s) instead
of a string
matplotlib.rcParams['text.latex.preamble']=[r"\usepackage[garamond,sfscaled=false]
{mathdesign}"]
Kind regards,
Matthias
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users