Hmm, I'm afraid that this only works if you use preview mode. I
haven't tested, but I guess it will fail without it. Check if
rcParams["text.latex.preview"]==True.

-JJ



On Mon, Sep 28, 2009 at 6:26 PM, Jae-Joon Lee <lee.j.j...@gmail.com> wrote:
> You need an empty mbox at the end of line (\mbox{}).
>
> text(xlim()[1],1.02,r'$r^2$~~~\mbox{}',horizontalalignment='right')
>
> If you did mean \; after ^, it requires {}.
>
> Again, these only works if you use real TeX for text rendering (ie
> usetex=True), not the mpl's mathtext mode.
>
> Regards,
>
> -JJ
>
>
> On Mon, Sep 28, 2009 at 5:48 PM, Christopher Barrington-Leigh
> <cpblpublic+nab...@gmail.com> wrote:
>>
>> All my attempts at using TeX spacing failed too. What do you have in mind?
>>
>> e.g.
>> text(xlim()[1],1.02,r'$r^\;2$~~~',horizontalalignment='right')
>>
>>
>> Jae-Joon Lee wrote:
>>>
>>> While I think you're not using usetex mode, you may use tex's own
>>> spacing command with usetex mode. Depending on your need, you may also
>>> use the annotate function with which you can provide a spacing in
>>> pixel coordinate (or other coordinate the annotate supports).
>>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/trailing-space-in-text-string-stripped%2C-making-it-impossible-to-right-pad-my-text-tp25639703p25653573.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to