I'm trying to work out a way of printing plots as vector graphics that
use alpha channel.

I understand that postscript doesn't do alpha, so I was hoping to save
the plot as svg, import into illustrator and then save as a pdf and/or
print.

So I run the following file: (matplotlib svn 2943, os x, WXAgg back end)

from pylab import *
from numpy import *
rx, ry = 1.8, 1.
area = rx * ry * pi
theta = arange(0, 2*pi+0.01, 0.1)
verts = zip(rx/area*cos(theta), ry/area*sin(theta))

x = [0,0.1,0.2, 0.5,0.43]
y = [0.,0.1,0.,0.20,.2]
scatter(x,y, c='r', edgecolor='k', faceted=True, s=300, marker=None,
verts=verts, alpha=0.2)
y = array(y) + 0.01
scatter(x,y, c='g', edgecolor='k', faceted=True, s=300, marker=None,
verts=verts, alpha=0.2)
savefig('alpha_test.svg')

Unfortunately if I import alpha_test.svg into Illustrator or Inkscape,
the ellipses appear completely solid. Saving directly as .pdf produces
a solid image as well.


However, if I save the figure as .png, the ellipses are transparent.
I had the same problem running a slightly earlier version of
matplotlib on a Linux  box with GTKAgg


Regards, George Nurser.

Attachment: alpha_test.svg
Description: image/svg

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to