Ask Your Question

Ornementation in Graph

asked 2021-03-15 17:13:16 +0100

Cyrille gravatar image
 A simple question due to my incompetence. In the following graph
H2.relabel({0:'A' , 1:'B', 2:'C', 3:'D'})
show(H2.vertices())'green',vertex_colors={'red': [0,1,3]},edge_colors={(.5,.25,.5):[('1',3,None),(1,3,None),(3,0,None)],(.25,.75,.25):[(0,2,None)]})'green',vertex_colors={'red': ['A','B','D']},edge_colors={(.5,.25,.5):[('A','B',None),('B','D',None),('D','A',None)],(.25,.75,.25):[('A','C',None)]})

what means None (I have'nt found in the documentation. And is it possible to print the vertex like a LaTeX expression.

edit retag flag offensive close merge delete


None est l'étiquette par défaut des arêtes dans les graphes. C'est équivalent à l'absence d'étiquette.

FrédéricC gravatar imageFrédéricC ( 2021-03-15 17:45:03 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-03-15 22:47:37 +0100

Max Alekseyev gravatar image

These are edge labels. Each edge is described by a 3-element tuple $(s,t,l)$ where $s$ and $t$ are start/end vertices, and $l$ in a label. None means that there is no label.

edit flag offensive delete link more


Same answer that the one of FrédéricC. But for LaTex rendering ?

Cyrille gravatar imageCyrille ( 2021-03-16 11:19:01 +0100 )edit

According to

Vertex Labels: can use latex formatting, and may have their colors specified, including on a per-vertex basis

Max Alekseyev gravatar imageMax Alekseyev ( 2021-03-16 23:52:01 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2021-03-15 17:13:16 +0100

Seen: 257 times

Last updated: Mar 15 '21