plot graphs with graph in vertices

asked 7 years ago

vdelecroix gravatar image

I have a graph whose vertices are made of graphs. Is there a way to plot them nicely from Sage? Doing

sage: G0 = graphs.PetersenGraph().copy(immutable=True)
sage: G1 = graphs.CycleGraph(4).copy(immutable=True)
sage: G = Graph([(G0,G1)])
sage: G.plot()

The names of the graph are in the vertices not the graphics of them.

Preview: (hide)

Comments

If there is an option in the graph plot to use an alternate name for them, perhaps you could hack the _repr_ or whatever to do this ... hmm.

kcrisman gravatar imagekcrisman ( 7 years ago )

Ticket 21918 could help...

David Coudert gravatar imageDavid Coudert ( 7 years ago )

Note: a similar question was asked on StackOverflow. So far no answer there.

slelievre gravatar imageslelievre ( 7 years ago )