Graphics array formatting

asked 2016-05-26 18:41:11 -0500

MvG gravatar image

updated 2016-05-26 19:42:41 -0500

I'm computing a number of plots (actually collections of 2d polygons) of roughly square aspect ratio, and would like to display them in a reasonable way:

  • use two columns
  • preserve order
  • title each of them
  • adjust the size to fill the width of my notebook, disregarding the height

First I displayed each graphics as it arrived, or combined bunches of them into graphics_array in order to show them. But my sage notebook (the classical one, not the IPython flavor) failed to preserve order in that case. So I feel that I have to build one big graphics_array.

But I've got trouble adjusting its width without specifying its height, and I don't know a suitable height up front. Most of the times if I specify one of the sizes too large, I end up with lots of empty space in one of the directions.

Furthermore, I didn't manage to title the individual graphics, since a title attribute to the polygon2d call remains without effect, while a title attribute to the show affects the whole plot and all the nested plots. Constructing an empty Graphics(title="foo") doesn't seem to work.

This is on sage 6.10.beta4, so things might have improved since then. If so, I haven't yet found the appropriate locations in the online documentation indicating how this changed.

If you want to try this out: I wanted to format the output of this code but using two columns and a varying number of rows for each n.

edit retag flag offensive close merge delete

Comments

1

Related, though I don't think solving these necessarily solve your issue: http://trac.sagemath.org/ticket/10657, http://trac.sagemath.org/ticket/11160, http://trac.sagemath.org/ticket/10656

kcrisman gravatar imagekcrisman ( 2016-05-26 21:27:22 -0500 )edit