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.

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

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-------------------------------------------------------------------------
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