They don't look non-antialiased to me (in your attachment or a file I 
generated locally).  Remember, the rotation happens in raster (not 
vector) space, because that was the path of least resistance, but is a 
bit of a hack.

The difference is that the trunk appears slightly darker than 0.91.x.  
(And 0.90.x, if I recall correctly, didn't support non-90 degree 
rotations of text at all).  0.91.x is using spline36 interpolation, 
trunk is using spline16.  I *think* I changed it because I thought 
spline16 looked slightly cleaner (though technically less accurate), and 
of course is faster, but I'm not sure anymore -- SVN blame isn't helping 
me remember.  It could have just been the example I was using at the 
time looked better.

In any case, you should be able to change this line in _backend_agg.cpp:2197

  filter.calculate(agg::image_filter_spline16());

to any of the interpolation kernels that Agg offers, and experiment 
until you find something suitable.

Cheers,
Mike

John Hunter wrote:
> On the trunk, it appears that font anti-aliasing is turned off on
> rotated text, as in this example:
>
> n [26]: import datetime
>
> In [27]: dt = datetime.date.today()
>
> In [28]: dates = [dt-datetime.timedelta(days=i) for i in range(10)]
>
> In [29]: plot(dates, range(10))
> Out[29]: [<matplotlib.lines.Line2D object at 0x98f96ac>]
>
> # after rotation the fonts are pixelated
> In [34]: gcf().autofmt_xdate ()
>
> In [35]: draw()
>   
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   

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


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to