Ask Your Question

Revision history [back]

Display graph drawings in order

Often I want to compute a graph parameter for each graph in a list of graphs. I would like to print the value of the chosen parameter along with a drawing of each graph. So I do something like this, where L is a list of graphs:

for G in L: print G.vertex_connectivity(); show(G.plot());

The problem is that the plots don't show up until after all of the printed output, and they appear in an order different from the original list. Is there any way to force a plot to appear exactly where I want it?

 2 No.2 Revision tmonteil 20703 ●25 ●146 ●382 http://wiki.sagemath.o...

Display graph drawings in order

Often I want to compute a graph parameter for each graph in a list of graphs. I would like to print the value of the chosen parameter along with a drawing of each graph. So I do something like this, where L is a list of graphs:

for G in L:
print G.vertex_connectivity();
show(G.plot());show(G.plot());


The problem is that the plots don't show up until after all of the printed output, and they appear in an order different from the original list. Is there any way to force a plot to appear exactly where I want it?

Display graph drawings in order

Often I want to compute a graph parameter for each graph in a list of graphs. I would like to print the value of the chosen parameter along with a drawing of each graph. So I do something like this, where L is a list of graphs:

for G in L:
print G.vertex_connectivity();
show(G.plot());

show(G.plot());

The problem is that the plots don't show up until after all of the printed output, and they appear in an order different from the original list. Is there any way to force a plot to appear exactly where I want it?it? I am using a Sage notebook.