From: Christopher Barrington-L. <cpb...@gm...> - 2009-09-29 04:53:34
|
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. |