SVG backend - edge alpha channel fix?

Here is an example which generates both a png and svg file.
The png edge alpha levels are displayed correctly, while the svg edges
have an alpha value of 1.0
I tested this with a fresh build of matplotlib-1.0.svn r8391
Thanks for your help.

#!/usr/bin/python
import sys
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as N
import networkx as nx

def main():
   G = nx.Graph()
   G.add_nodes_from([0,1,2])
   G.add_edges_from([(0,1),(0,2),(1,2)])
   pos = nx.spring_layout(G)
   nx.draw_networkx_nodes(G, pos, node_size=1500,
node_color=['c','m','y'], alpha=0.3)
   nx.draw_networkx_edges(G, pos, width=45, edge_color=['r','g','b'], alpha=0.3)
   nx.draw_networkx_labels(G, pos)
   plt.savefig('test.png')
   plt.savefig('test.svg')
   return 0

if __name__ == "__main__":
    sys.exit(main())

Here is an example which generates both a png and svg file.
The png edge alpha levels are displayed correctly, while the svg edges
have an alpha value of 1.0
I tested this with a fresh build of matplotlib-1.0.svn r8391
Thanks for your help.

And thank you for the report. I have fixed this in 8394.

Eric

···

On 06/07/2010 03:04 AM, Bob wrote:

#!/usr/bin/python
import sys
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as N
import networkx as nx

def main():
    G = nx.Graph()
    G.add_nodes_from([0,1,2])
    G.add_edges_from([(0,1),(0,2),(1,2)])
    pos = nx.spring_layout(G)
    nx.draw_networkx_nodes(G, pos, node_size=1500,
node_color=['c','m','y'], alpha=0.3)
    nx.draw_networkx_edges(G, pos, width=45, edge_color=['r','g','b'], alpha=0.3)
    nx.draw_networkx_labels(G, pos)
    plt.savefig('test.png')
    plt.savefig('test.svg')
    return 0

if __name__ == "__main__":
     sys.exit(main())

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options