plot graphs with graph in vertices

asked 2017-08-31 19:55:20 +0100

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.

edit retag flag offensive close merge delete

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 ( 2017-08-31 20:06:35 +0100 )edit

Ticket 21918 could help...

David Coudert gravatar imageDavid Coudert ( 2017-09-01 10:30:38 +0100 )edit

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

slelievre gravatar imageslelievre ( 2017-09-01 20:20:52 +0100 )edit