简体   繁体   中英

Exporting edge colors to Gephi from NetworkX

Adding colored nodes is covered here .

However, a similar method does not work for edges, it seems.

At the moment the edges of my graph are different colors in NetworkX, but Gephi can't seem to see that.

I have tried:

edge[2]['viz'] = {color: {'r': 255, 'g': 0, 'b': 0, 'a': 0}}

and Gephi just ignores the color property.

Is there a way to add colored edges?

The issue here was that I had alpha 'a' set to 0 .

Setting it to literally any positive number will solve the issue / save hours of your time.

edge[2]['viz'] = {color: {'r': 255, 'g': 0, 'b': 0, 'a': 1.0}}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM