mathtext and raw strings

Hello everyone,

I intended to use the capabilities of mathtext as presented on the matplotlib example page and the tutorial page. The examples given are quite clear; yet they always assume that you pass the string that should be interpreted as raw string, e.g.

r'$\sum_{i=0}^\infty x_i$'

However, in my application the user types the labels/title/whatever text in a gtk entry field and this string, which is a unicode string, is then passed on to the matplotlib OO interface. And as it is right now, I just get the text as it is, so no fancy sum or infinity sign.

I'd appreciate your help,

Niklas.

N. Volbers schrieb:

Hello everyone,

I intended to use the capabilities of mathtext as presented on the matplotlib example page and the tutorial page. The examples given are quite clear; yet they always assume that you pass the string that should be interpreted as raw string, e.g.

r'$\sum_{i=0}^\infty x_i$'

However, in my application the user types the labels/title/whatever text in a gtk entry field and this string, which is a unicode string, is then passed on to the matplotlib OO interface. And as it is right now, I just get the text as it is, so no fancy sum or infinity sign.

I'd appreciate your help,

Niklas.

Sorry to have bothered you with this!

There was no problem at all with the string passing; my problem was somehow different, and now mathtext works just fine. Great!

So just forget about my question :wink:

Niklas.