Advertisement
superguru

Visualise Potential Connections in a Network using Graphviz

Nov 27th, 2019
2,826
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
DOT 0.78 KB | None | 0 0
  1. /*
  2. Visualise Potential Connections in a Network using Graphviz
  3.  
  4. Invocation: dot -Tsvg -O PC6.gv
  5. Formula: (n*(n-1))/2  // This is n choose k, where k = 2
  6.  
  7. Sample file below is for a network of 6
  8.  
  9. Nodes/Edges are generated using the "Generate Potential Connection Edges" Python script (see https://pastebin.com/WF1viLAB)
  10. */
  11. graph G {                                          
  12. //layout = "circo"                                         
  13. layout = "twopi"                                           
  14.                                            
  15. graph   [   bgcolor = "#c7eae5" ]                              
  16. node    [   shape = "circle"    ,   style = "filled"    ,   fillcolor = "#d3d3d3"   ]              
  17. edge    [   dir = "both"    ,   arrowsize = "0.4"   ,   arrowhead = "vee"   ,   arrowtail = "vee"   ]      
  18.                                            
  19. A   [   fillcolor = "#d3d3ff"   ]                              
  20.                                            
  21. A  -- { B  C  D  E  F  }
  22. B  -- { C  D  E  F  }
  23. C  -- { D  E  F  }
  24. D  -- { E  F  }
  25. E  -- { F  }                               
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement