Jae-Joon Lee wrote: > > 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. > Hm, I don't know about mpl's mathtext mode, but I'm actually always working in usetex mode. Unfortunately, even so, "text.latex.preview" does not exist in rcParams for me. However,... : I think the following behaviour is definitely buggy! Please try the following one at a time, in ion() mode (or just see sequence of png's produced). None of these succeeds in getting the desired alignment. from matplotlib import rc figure(1) clf() plot([0,0],[1,1]) rc('text', usetex=True) text(xlim()[1],.96,r'$r^2$~~~\mbox{}',horizontalalignment='right') savefig('t10.png') rc('text', usetex=False) show() savefig('t20.png') text(xlim()[1],.97,r'$r^2$~~~\mbox{}',horizontalalignment='right') savefig('t30.png') rc('text', usetex=True) show() savefig('t40.png') -- View this message in context: http://www.nabble.com/trailing-space-in-text-string-stripped%2C-making-it-impossible-to-right-pad-my-text-tp25639703p25656912.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® 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-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] trailing space in text string stripped, making it impossible to right-pad my text
Christopher Barrington-Leigh Mon, 28 Sep 2009 21:54:24 -0700
- [Matplotlib-users] trailing space in text st... Christopher Barrington-Leigh
- Re: [Matplotlib-users] trailing space in... John [H2O]
- Re: [Matplotlib-users] trailing spac... Christopher Barrington-Leigh
- Re: [Matplotlib-users] trailing spac... Christopher Barrington-Leigh
- Re: [Matplotlib-users] trailing space in... Jae-Joon Lee
- Re: [Matplotlib-users] trailing spac... Christopher Barrington-Leigh
- Re: [Matplotlib-users] trailing ... Jae-Joon Lee
- Re: [Matplotlib-users] trail... Jae-Joon Lee
- Re: [Matplotlib-users] ... Christopher Barrington-Leigh
- Re: [Matplotlib-use... Jae-Joon Lee
- Re: [Matplotlib... Christopher Barrington-Leigh
- Re: [Matplotlib... Jae-Joon Lee
- Re: [Matplotlib... Michael Droettboom
- Re: [Matplotlib-users] trailing space in... Stan West