Michael Droettboom wrote:
> You need to escape the [:
> 
>    mpl_pp.xlabel(r"$\[$")
> 
> [] and {} have special meanings in math syntax, so to use them 
> "literally", they need to be escaped.

Really? Note that Matthias had text.usetex=False.
I tried various configurations:

text.usetex=True

   xlabel( "$[$")     okay
   xlabel(r"$\[$")    okay
   xlabel( "$\[$")    no error, but also no label displayed


text.usetex=False

   xlabel("$[$")      failed with
       Expected end of text (at char 0), (line:1, col:1)

   xlabel(r"$\[$")
   xlabel( "$\[$")    no error, but displays a star symbol

In the last two cases I got a warning

mathtext.py:722: MathTextWarning: Unrecognized symbol '\['. Substituting 
with a dummy symbol.
   % sym.encode('ascii', 'backslashreplace'), MathTextWarning)

Cheers,
Manuel

> Cheers,
> Mike
> 
> Matthias Michler wrote:
>> Hello list,
>>
>> the little example below leads to an error on my system (output is attached).
>> I used this some time ago and it worked. Now I'm using the release 0.91.2.
>> Is there a reason to use rectangular brackets not in mathtext?
>> (same problem occur with '{' for me.)
>>
>> best regards and thanks in advance for any help,
>> Matthias
>> -------------------------------------------------------------------------------------------------
>> import matplotlib.pyplot as mpl_pp
>> mpl_pp.axes()
>> mpl_pp.xlabel("$[$")
>> mpl_pp.show()
>>
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to