Following the advice to ping you on the mailing list, I've submitted a 
suggestion for a patch to the EMF Backend.  I've copied the contents 
here for convenience.

Patch ID is: 3232997

Content is:

With Matplotlib 1.0.1, When plotting a patch (e.g. text with a bbox with 
facecolor), the facecolor of the patch is passed to the backend as RGBa. 
EMFBrush can't handle RGBa and dies with the following:

File "/usr/local/lib/python2.7/dist-packages/matplotlib/patches.py", 
line 411, in draw
renderer.draw_path(gc, tpath, affine, rgbFace)
File 
"/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_emf.py", 
line 260, in draw_path
self.select_brush(rgbFace)
File 
"/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_emf.py", 
line 567, in select_brush
brush=EMFBrush(self.emf,rgb)
File 
"/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_emf.py", 
line 107, in __init__
r,g,b=rgb
ValueError: too many values to unpack

Suggested patch is to change line 107 in backend_emf.py from r,g,b=rgb to:

r,g,b=rgb[:3]

which will drop the alpha channel. Given the EMF backend doesn't support 
alpha channels, it shouldn't cause any problems to do this silently.

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to