superscript and font size

Paul Kienzle wrote:
> Hi,
>
> The superscripts in mpl don't seem to be placed at the correct height for
> small fonts. The y-tics on the attached plot shows this. The effect is
> similar in svg and pdf backends.
>
Thanks. When looking up the x-height, the code was not taking the font
size into account. This has been fixed on the branch and trunk.

Thanks. It looks much better in png, but pdf has the subscript raised much
higher, and svg isn't rendering fonts at all (see attached).

> I'm using 0.91.2 because the latest svn version gives me a KeyError for
> ufunc isfinite.
>
Can you provide the full traceback here so we can diagnose and fix this
problem? The only reference to isfinite seems to be in the PDF backend,
which is working for me, and is identical in 0.91.2 and trunk in that
respect. There is probably a more complex Numpy version interaction
going on.

I recompiled with Numpy 1.1 and the problem went away. I'm going to
ignore the issue for now.

  - Paul

tiny.png

tiny.pdf (25.6 KB)

tiny.svg

···

On Thu, Apr 24, 2008 at 08:38:02AM -0400, Michael Droettboom wrote:

Paul Kienzle wrote:

  

Paul Kienzle wrote:
    

Hi,

The superscripts in mpl don't seem to be placed at the correct height for
small fonts. The y-tics on the attached plot shows this. The effect is
similar in svg and pdf backends.
  

Thanks. When looking up the x-height, the code was not taking the font size into account. This has been fixed on the branch and trunk.
    
Thanks. It looks much better in png, but pdf has the subscript raised much
higher,

That was a DPI-related bug, that is hopefully now fixed in SVN.

and svg isn't rendering fonts at all (see attached).
  

Thanks. The SVG was broken in SVN March 26 trying to workaround an Inkscape copy/paste bug. I think it is fixed now so it works in Mozilla and Inkscape simultaneously. But please let me know if you see anything fishy -- there seems to be a great deal of variability between SVG viewers.

Are you seeing this bug with 0.91.2 release, or just the 0.91.2 SVN branch? I'd be surprised by the former (and I can't reproduce it there).

Cheers, and thanks for your patience,
Mike

···

On Thu, Apr 24, 2008 at 08:38:02AM -0400, Michael Droettboom wrote:

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA