matplotlib agg ticks when rendering floating points
Question: This is the same problem as here: [python odd axis ticks,
matplotlib](http://stackoverflow.com/questions/16895980/python-odd-axis-ticks-
matplotlib). Except no one is following that question so to make it little
clearer:

I'm using a Linux machine:

    
    
    $ uname -a
    $ Linux stokes1 2.6.32.59-0.3-default #1 SMP 2012-04-27 11:14:44 +0200 x86_64 x86_64 x86_64 GNU/Linux
    

So this happens with Matplotlib (version 1.0.0) when using Agg (v2.2; any
combination I suspect, like TkAgg etc. but I can't check for sure because only
TkAgg is available on the machine). This is not my PC so I don't have root
access but I can talk with the administrators and let them know about it, but
I also wanted to get some details on the matter.

So basically if you take a look at the pictures you can see the problem with
the ticks. Now I found out that this only happens when the ticks are floating
point numbers as can be seen. I don't think it's a font problem since I'm
using the standard Bitstream Vera and also this doesn't happen if I use svg as
backend.

This can be reproduced by:

    
    
    import matplotlib as m
    m.use('tkagg')
    from pylab import *
    plot()
    show()
    

![x, y floating point ticks](http://i.stack.imgur.com/KzzgY.png)

![y floating point, x integer ticks](http://i.stack.imgur.com/inuV2.png)


Answer: I didn't find an answer to the problem with the boxes around the floating
point numbers, but the administrator of the machine gave me a workaround:

    
    
    import matplotlib as m
    m.use('agg')
    import matplotlib.pyplot as plt
    from matplotlib.ticker import FormatStrFormatter
    
    plt.gca().xaxis.set_major_formatter(FormatStrFormatter('%.1f'))
    plt.gca().yaxis.set_major_formatter(FormatStrFormatter('%.1f'))
    plt.plot()
    plt.savefig('test')
    

which produces this result: ![workaround for floating point number
boxes](http://i.stack.imgur.com/XEJKZ.png)

If I get an explanation from the administrator of the machine where this weird
boxes appear I will add it to the answer. Meanwhile hope this helps someone.

