Plotting Graphs with different size vertices

asked 5 years ago

ga38xab gravatar image

updated 5 years ago

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?

Preview: (hide)

Comments

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 ( 5 years ago )