Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to commentaries to a graph

Two question for one

1) It seems that the thikness parameter has no effect on the following graph

g2={0:[1,3,4,5,6],1:[2,3,4,5,6],2:[0,4,5,6],3:[2,4,5,6],4:[5,6],5:[],6:[5]}
H2=DiGraph(g2)
H2.relabel({0:'A' , 1:'B', 2:'C', 3:'D', 4:'E', 5:'F', 6:'G'})
vene_red="#DC0005"
pink="#FFB6C1"
dark_turquoise="#00CED1"
mon_vert="#008000"
vieux_rose="#D8BFD8"
re1=H2.show(edge_thickness=0.1,layout="circular",vertex_colors={pink: ['G','F','E'],vene_red: ['A','B','C','D']},
        edge_colors={dark_turquoise:[('A','E',None),('A','F',None),('A','G',None),('B','E',None),('B','F',None),('B','G',None),
                                ('C','E',None),('C','F',None),('C','G',None),('D','E',None),('D','F',None),('D','G',None)],
                   vieux_rose:[('E','G',None),('E','F',None),('G','F',None)],
                    mon_vert:[('A','B',None),('A','D',None),('B','C',None),('B','D',None),
                              ('C','A',None),('D','C',None)]})

2) In this graph colors have meaning. Is it possible to add some commentaries in the graph. I was expecting doing this by graphics_array() but it seems not to work. I think the problem comes from the options.

How to commentaries to a graph

Two question for one

1) It seems that the thikness parameter has no effect on the following graph

g2={0:[1,3,4,5,6],1:[2,3,4,5,6],2:[0,4,5,6],3:[2,4,5,6],4:[5,6],5:[],6:[5]}
H2=DiGraph(g2)
H2.relabel({0:'A' , 1:'B', 2:'C', 3:'D', 4:'E', 5:'F', 6:'G'})
vene_red="#DC0005"
pink="#FFB6C1"
dark_turquoise="#00CED1"
mon_vert="#008000"
vieux_rose="#D8BFD8"
re1=H2.show(edge_thickness=0.1,layout="circular",vertex_colors={pink: ['G','F','E'],vene_red: ['A','B','C','D']},
        edge_colors={dark_turquoise:[('A','E',None),('A','F',None),('A','G',None),('B','E',None),('B','F',None),('B','G',None),
                                ('C','E',None),('C','F',None),('C','G',None),('D','E',None),('D','F',None),('D','G',None)],
                   vieux_rose:[('E','G',None),('E','F',None),('G','F',None)],
                    mon_vert:[('A','B',None),('A','D',None),('B','C',None),('B','D',None),
                              ('C','A',None),('D','C',None)]})

2) In this graph colors have meaning. Is it possible to add some commentaries in the graph. I was expecting doing this by graphics_array() but it seems not to work. I think the problem comes from the options.