From: Christopher Barrington-L. <cpb...@gm...> - 2009-09-30 20:38:56
|
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 to point me to a link to info on what you mean by "preview mode"? By recent version you mean something in the svn, I guess? > This does not. First of all, "~" and "\mbox" are not supported if > usetex=False and I guess never will be. On the other hand, > as far as I can see, the whitespace stripping is not done in mpl > side. And I have a feeling that it may be the freetype library. mpl > uses FT_Glyph_Get_CBox to calculate the extents of the text and I > think this seems to fail when there is a trailing spaces. This is > beyond me I hope other developers have better idea. > > Thanks, I too hope some other developers chime in! > So, Christopher, > I guess your best chance is to upgrade and use preview mode, or use > annotate function. > I am not clear how annotate helps. If I am willing to specify x,y locations, I can do that with text() as well, no?. It's still a matter of calculating how big a piece of whitespace should end up, roughly. Thanks, JJ! -- View this message in context: http://www.nabble.com/trailing-space-in-text-string-stripped%2C-making-it-impossible-to-right-pad-my-text-tp25639703p25688584.html Sent from the matplotlib - users mailing list archive at Nabble.com. |