Wxpython backend finding the xpm bitmap files

Hello,

I just tried out the wxpython backend from the CVS and it seems to work as advertised, except a small glitch.

I had matplotlib installed in another location, not under the default python main tree and use the environmental variable AFMPATH to point to the afm fonts files. The backend_wx(.py) relies on distutils.sysconfig.PREFIX to find the GUI bitmap files. Adding the following 2 lines

     if os.environ.has_key('AFMPATH'):
         basedir = os.environ['AFMPATH']

after the line

basedir = os.path.join(distutils.sysconfig.PREFIX, 'share', 'matplotlib')

in the function _load_bitmap(filename) will enable it to locate the bitmap files which are installed together with the afm font files. (As AFMPATH points to more than font resources, a more appropriate name such as MATPLOTLIBRESOURCE may be warranted, though changing it will break old installations. I'm happy to let it stay as it is.)

Regards,
ST