ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 01 Sep 2017 20:20:52 +0200plot graphs with graph in verticeshttps://ask.sagemath.org/question/38700/plot-graphs-with-graph-in-vertices/ 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.Thu, 31 Aug 2017 19:55:20 +0200https://ask.sagemath.org/question/38700/plot-graphs-with-graph-in-vertices/Comment by kcrisman for <p>I have a graph whose vertices are made of graphs. Is there a way to plot them nicely from Sage? Doing</p>
<pre><code>sage: G0 = graphs.PetersenGraph().copy(immutable=True)
sage: G1 = graphs.CycleGraph(4).copy(immutable=True)
sage: G = Graph([(G0,G1)])
sage: G.plot()
</code></pre>
<p>The names of the graph are in the vertices not the graphics of them.</p>
https://ask.sagemath.org/question/38700/plot-graphs-with-graph-in-vertices/?comment=38701#post-id-38701If 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.Thu, 31 Aug 2017 20:06:35 +0200https://ask.sagemath.org/question/38700/plot-graphs-with-graph-in-vertices/?comment=38701#post-id-38701Comment by David Coudert for <p>I have a graph whose vertices are made of graphs. Is there a way to plot them nicely from Sage? Doing</p>
<pre><code>sage: G0 = graphs.PetersenGraph().copy(immutable=True)
sage: G1 = graphs.CycleGraph(4).copy(immutable=True)
sage: G = Graph([(G0,G1)])
sage: G.plot()
</code></pre>
<p>The names of the graph are in the vertices not the graphics of them.</p>
https://ask.sagemath.org/question/38700/plot-graphs-with-graph-in-vertices/?comment=38706#post-id-38706Ticket [21918](https://trac.sagemath.org/ticket/21918) could help...Fri, 01 Sep 2017 10:30:38 +0200https://ask.sagemath.org/question/38700/plot-graphs-with-graph-in-vertices/?comment=38706#post-id-38706Comment by slelievre for <p>I have a graph whose vertices are made of graphs. Is there a way to plot them nicely from Sage? Doing</p>
<pre><code>sage: G0 = graphs.PetersenGraph().copy(immutable=True)
sage: G1 = graphs.CycleGraph(4).copy(immutable=True)
sage: G = Graph([(G0,G1)])
sage: G.plot()
</code></pre>
<p>The names of the graph are in the vertices not the graphics of them.</p>
https://ask.sagemath.org/question/38700/plot-graphs-with-graph-in-vertices/?comment=38709#post-id-38709Note: a similar question was [asked on StackOverflow](https://stackoverflow.com/questions/39551680/how-can-i-get-a-graph-of-graphs-to-display-in-sage). So far no answer there.Fri, 01 Sep 2017 20:20:52 +0200https://ask.sagemath.org/question/38700/plot-graphs-with-graph-in-vertices/?comment=38709#post-id-38709