Rounded edges in picturebox C#

putting 1 Picture box on the form and write this code also you can change the the minus number beside of Width and Height to get best result System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath(); gp.AddEllipse(0, 0, pictureBox1.Width – 3, pictureBox1.Height – 3); Region rg = new Region(gp); pictureBox1.Region = rg;

Drawing multiple edges between two nodes with networkx

An improvement to the reply above is adding the connectionstyle to nx.draw, this allows to see two parallel lines in the plot: import networkx as nx import matplotlib.pyplot as plt G = nx.DiGraph() #or G = nx.MultiDiGraph() G.add_node(‘A’) G.add_node(‘B’) G.add_edge(‘A’, ‘B’, length = 2) G.add_edge(‘B’, ‘A’, length = 3) pos = nx.spring_layout(G) nx.draw(G, pos, with_labels=True, … Read more

Graph auto-layout algorithm

You will find http://graphdrawing.org/ and this tutorial, by Roberto Tamassia, professor at Brown University, quite helpful. I like a lot Force-Directed Techniques (pp. 66-72 in the tutorial) like the Spring Embedder. You assume there is a spring or other force between any two adjacent nodes and let nature (simulation) do the work 🙂