Python igrap create manual graph -



  igraph import from * g = graph (guided = true) #now create simple guided tomas - & gt; Dennis, Dennis - & gt; Swan, Swan - & gt; Tomas, Dennis - & gt; Burt GV ["Name"] = ["Tomas", "Dennis", "Swan", "Tomas", "Burt"] layout = G. Layout_community_command () gv ["Label"] = GVS ["Name"] layout = g Layout ("work_key") plot (G, layout = layout)  

Is it appropriate to label the connection. (Under-indented / guided lane)

You can do something like:

  from Igraph import * g = graph (guided = true) g.add_vertices (5) g.add_edges ([(0,1), (1,2), (2,3), (1,4) ]) G.vs ["name"] = ["Tomas", "Dennis", "Hans", "Tomus_2", "Burt"] GV ["Label"] = GVS ["name"] #Now I count the number of edges and I give numbers as g.es ["name"] = range (g.ecount ()) G.es ["label"] = g.es ["name"] plot (g)  

You should get something like the following:


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -