Re: [Matplotlib-users] Question about mathtext

2010-04-20 Thread Michael Droettboom
That's great news -- glad we got to the bottom of it, though I'm not sure how your system may have become wedged like that in the first place. I should have thought of this earlier, but if it happens again, can you send me your fontList.cache file so I can inspect it? There may be a bug in th

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
Hmm... I'm a bit stumped. Can you print out the values of these from your script, i.e. put the following at the top: from matplotlib import rcParams print rcParams['mathtext.fontset'] print rcParams['mathtext.default'] Can you try deleting your fontList.cache file? Mike william ratclif

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
>From my mpl-data directory, here's what's in the mathtext section of my matplotlibrc file: # The following settings allow you to select the fonts in math mode. # They map from a TeX font name to a fontconfig font pattern. # These settings are only used if mathtext.fontset is 'custom'. # Note that

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
The puzzling thing is this: u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF' It's using a custom font in mathtext. Are you setting the rcParams mathtext.fontset or mathtext.default? That may the culprit, and if not, it's a bug that it's trying to use that font. Mike william ratcliff wrote: > On the plus

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
On the plus side, there is no longer an error when I apply the patch. On the downside, it generates a rather strange symbol instead of a perpendicular symbolLet me try to quickly upgrade to 0.99.1. I did that and I seem to get the same error... On Mon, Apr 19, 2010 at 10:49 AM, Michael Droet

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
Does forcibly casting the path to a string resolve the problem? i.e. applying this patch: Index: mathtext.py === --- mathtext.py (revision 8216) +++ mathtext.py (working copy) @@ -597,7 +597,7 @@ cached_font = self._fonts.

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
Assuming that the matplotlibrc file being read is in mpl-data, here is the relevant section: ### FONT # # font properties used by text.Text. See # http://matplotlib.sourceforge.net/api/font_manager_api.html for more # information on font properties. The 6 font properties used for font # matchin

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
Mike, The basename is: u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF' Let me try to find where my matplotlibrc file is located... Thanks, William On Mon, Apr 19, 2010 at 10:22 AM, Michael Droettboom wrote: > One might see that error if the path to the font being used contains > non-ascii characters (the

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
One might see that error if the path to the font being used contains non-ascii characters (the "basename" variable in the last frame of the stack in the stacktrace). Is that possible? We may need to implement the same workaround we use for image files for loading fonts (which is to open the f

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
I'm not able to reproduce that here, with either SVN or 0.99.1.2. Do you have any font-related or mathtext-related settings in your matplotlibrc? Mike william ratcliff wrote: > I think the actual error was: > TypeError: cannot return std::string from Unicode object > > It was the error returned

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
I think the actual error was: TypeError: cannot return std::string from Unicode object It was the error returned when I walked through with a debugger... On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom wrote: > It looks like the end of the traceback -- where the actual exception is > named

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
It looks like the end of the traceback -- where the actual exception is named -- is missing. Can you repost it in its entirety? Mike william ratcliff wrote: > Hi! I am using matplotlib 0.99.0 under windows xp. I tried the > following: > ax.text(.96,.80,r'$P \perp > Q$',fontsize=18,horizonta

[Matplotlib-users] Question about mathtext

2010-04-18 Thread william ratcliff
Hi! I am using matplotlib 0.99.0 under windows xp. I tried the following: ax.text(.96,.80,r'$P \perp Q$',fontsize=18,horizontalalignment='right',verticalalignment='top',transform=ax.transAxes,color='black') and get the following error: (However, in figure labels, symbols using mathtext, such as