On Tue, Nov 25, 2008 at 2:40 PM, Drain, Theodore R
<[EMAIL PROTECTED]> wrote:
> Michael,
> I think the issue is that there is no Unicode in the script that was attached 
> - it's just a simple polar call so the user isn't really Unicode".
>
> I think Unicode is starting to creep into the source in various places - we 
> just had a user point out that negative numbers are using a normal negative 
> sign ('-1.2') anymore but some kind of Unicode dash that's a lot bigger than 
> the normal one.  I wonder if this could be related...
>
> (If it matters, most of our users would rather have just the regular negative 
> sign and not embedded Unicode in the axis labels - it looks wrong to them and 
> makes doing any kind of processing of axis labels more difficult).

This was supposed to be a feature not a bug.  As far as I understand,
we are now using the proper minus sign which has the same width as the
horizontal part or a plus sign.  See

  http://en.wikipedia.org/wiki/Plus_sign#Plus_sign

in the section "Character codes".  The hyphen, which doubles as a
minus sign in the ascii character set, is not the proper character for
typesetting.

I don't think this is the problem Nils is having, because the
character code for the minus sign is different (and in the formatter,
we explicitly convert this if usetex is True) in the
ScalarFormatter.fix_minus method.

If the unicode minus is sufficiently problematic for you, I can add an
rc param.  Something like

  axis.unicode_minus : True

The problem here appears to be in
matplotlib.projects.polar.ThetaFormatter.__call__, which uses the
degree symbol.  I think all we need to do is return the proper tex
string in this case.  Michael, does this look right to you:

        def __call__(self, x, pos=None):
            # \u00b0 : degree symbol
            if rcParams['text.usetex'] and not rcParams['text.latex.unicode']:
                return r"$%d^\circ$" % ((x / npy.pi) * 180.0)
            else:
                return u"%d\u00b0" % ((x / npy.pi) * 180.0)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to