alpha blending with vector graphics

I’m trying to produce a vector graphics image with alpha blending, however, the two backends I tried do not work.
Specifically, the image has the right blending when doing pylab.show(), but savefig() produces an opaque output.

Here is sample code (for the SVG backend. PDF backend has the same problem):

import matplotlib
matplotlib.use(‘SVG’)
import matplotlib.pylab as pylab

pylab.scatter([1],[1],s=1000,c=‘g’,alpha=1.0)
pylab.scatter([1],[1],s=10,c=‘b’,alpha=0.2)
pylab.scatter([1],[1],s=100,c=‘r’,alpha=0.5)
pylab.savefig(‘foo.svg’)

I suspect a bug (my MPL version is ‘0.98pre’):
Using a text editor to manually change the svg file, replacing
“opacity: 1.0” with “opacity: 0.5” fixes the problem.

Thanks,
-sasha.

I recently fixed an alpha bug in pdf and svg that affected scatter in
svn r5630, so if you upgrade to either the latest svn HEAD or the
source release of 0.98.2 (binary builds not yet available), you'll
likely find this bug fixed.

JDH

···

On Thu, Jun 26, 2008 at 8:26 PM, Sasha Gutfraind <sgutfraind@...287...> wrote:

pylab.scatter([1],[1],s=1000,c='g',alpha=1.0)
pylab.scatter([1],[1],s=10,c='b',alpha=0.2)
pylab.scatter([1],[1],s=100,c='r',alpha=0.5)
pylab.savefig('foo.svg')

I suspect a bug (my MPL version is '0.98pre'):
Using a text editor to manually change the svg file, replacing
"opacity: 1.0" with "opacity: 0.5" fixes the problem.