Hello. My problem is as follows:
(ipython --pylab)
from pylab import *
pp=plot([0,0],[1,1])
text(xlim()[0],1,'Need padding ',horizontalalignment='left')
text(xlim()[1],1,'Need padding ',horizontalalignment='right')
The second case does not do what I want, which is to pad the text on
Thanks. Unfortunately this gives me the same results: no good. Something is
stripping whatever filler is there on the right.
text(xlim()[1],1.01,'string'.ljust(10,' '),horizontalalignment='right')
John [H2O] wrote:
>
> Untested, but I think you could do this with just python builtin types:
>
Thanks. Unfortunately this gives me the same results: no good. Something is
stripping whatever filler is there on the right.
text(xlim()[1],1.01,'string'.ljust(10,' '),horizontalalignment='right')
John [H2O] wrote:
>
>
>
> Christopher Barrington-L
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,
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. Unfort
Jae-Joon Lee wrote:
>
> This works if you use recent version of matplotlib with preview mode
> on. Without the preview mode (or other similar ways to report the
> dimension of the text from TeX side), I don't think this can be done.
>
>
Ok, thanks. I hope I am understanding. Would you be able