Plotting Graphs with different size vertices

asked 2019-06-20 12:58:49 +0200

ga38xab gravatar image

updated 2019-06-21 09:35:29 +0200

FrédéricC gravatar image

Hi, I'm trying to plot a graph where all vertices have a different size, depending on a value assigned to them, so a vertex with a high value would have a larger circumference.

I don't really know where to start. Can you help me?

edit retag flag offensive close merge delete


First sketch:

sage: G=Graph({1:[2],2:[3,4,5]})
sage: P=G.plot(save_pos=True)
sage: pos=G.get_pos()
sage: sum(circle(xy,0.33,color='red') for xy in pos.values())+P
FrédéricC gravatar imageFrédéricC ( 2019-06-20 17:14:24 +0200 )edit