plot graphs with graph in vertices

asked 2017-08-31 12:55:20 -0500

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


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 13:06:35 -0500 )edit

Ticket 21918 could help...

David Coudert gravatar imageDavid Coudert ( 2017-09-01 03:30:38 -0500 )edit

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

slelievre gravatar imageslelievre ( 2017-09-01 13:20:52 -0500 )edit