On 06/04/2010 07:46 AM, Bob wrote:
> I'm using matplotlib v0.99.1.1 pyplot savefig() to generate svg files
> using the matplotlib.use('SVG') backend. My networkx plot contains
> semi-transparent edges which were not carrying over to the svg xml
> correctly. The node transparencies were correct.
> I was able to fix this problem by modifying
> /matplotlib/backends/backend_svg.py ...
>
>
> @@ -150 +149 @@
> -                         gc.get_alpha(),
> +                         gc.get_rgb()[3],

I don't think this is the right thing to do in general--as far as I can 
see, gc.get_rgb() can return an rgb triplet instead of an rgba quad.

>
>
> While gc.get_rgb()[3] was able to return the correct alpha float
> value, gc.get_alpha() was always returning 1.0.
> Has anyone else seen this problem? Perhaps it's my use of
> draw_networkx_edges() to style the edges.

No, I think it is part of some difficulties in alpha-handling that have 
been around for a long time, and that I hope I have solved--although 
most likely there are still glitches to be smoothed out.

Can you build from svn and see whether that solves the problem?  If not, 
please provide a simplest-possible standalone script that illustrates 
the problem, so I can try running it from current mpl.

Eric


>
> Hope this helps,
> Bob

------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to