Hello Bernhard,

I'm not sure if my answer really fits your question, but it may help to use
>>> from matplotlib import rc
>>> rc('text', usetex=True)
like in the tex_demo.py (http://matplotlib.sourceforge.net/screenshots) or to 
change your matplotlibrc (for explanation see: 
http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex).

Seems to work for me.

best regards,
Matthias

On Tuesday 15 May 2007 15:14, Bernhard Voigt wrote:
> Dear all,
>
> is it possible to insert newlines in mathtex text?
>
> neither \newline, nor \\ seem to be understood:
>
> In [20]: text(.5,.5, r'$This is the first line \\ this is the second
> line$')
>
> Results in a single line.
>
> By the way, when there is an error in the tex string, the caching behind
> the scenes seems to be broken:
>
> In [21]: text(.5,.5, r'$This is the first line \newline this is the second
> line$')
> .....
> ValueError: unrecognized symbol "\newline"
>
> # removing the \newline command still yields the same ValueError
> In [23]: text(.5,.5, r'$This is the first line, this is the second line$')
> .....
> ValueError: unrecognized symbol "\newline"
>
>
> Thanks! Bernhard
>
>
> PS: matplotlib version is 0.87.7

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to