I am putting together a presentation with SlideView. Within many of the slides I have calls to Column using the Spacings option to adjust, well, the vertical spacings between elements. It seems however, that when wrapped inside SlideView, those spacings are completely undone, destroying what I am trying to show.

(In my case, I am using Column with seriously compressed spacings to display information compactly within the VertexRenderingFunction of a LayeredGraphPlot. All works beautifully when stand alone. However, when then simply wrapped in a SlideShow, rendering of the LayeredGraphPlot is destroyed: the vertices blow up, becoming so huge they totally cover each other, the graph structure, etc.)

Here is a snippet of code that shows the problem:

Row @ Table[
  Row @ {
    Framed @ Column[{1, 2, 3}, Center, Spacings -> vspace]
    , SlideView[{
      Framed @ Column[{1, 2, 3}, Center, Spacings -> vspace]}]
    , "   "},
  {vspace, {0, 1, 2}}]

Here is a picture of the output.

enter image description here

BTW, I've tried doing the layout with explicit vertical positioning of various Text and other Graphics elements over a Rectangle within the VertexRenderingFunction. This however requires knowing explicit rendered sizes of each element so they can be packed closely, and the surrounding Rectangle made the appropriate size. Those sizes change from instance to instance of the LayeredGraphPlot, so I can't just do it once and for all by hand. Doing it automatically, e.g., with Rasterize[thing, "RasterSize"] has proved surprisingly troublesome, but that is another issue...

I'm using Mathematica 10.4

  • $\begingroup$ You can use Grid[List /@ {1, 2, 3}, Spacings -> {Automatic, vspace}] till we crack the problem. $\endgroup$ – Kuba Jun 6 '16 at 18:11
  • $\begingroup$ Maybe adding Spacer can help $\endgroup$ – Wjx Jun 7 '16 at 4:03
  • $\begingroup$ The Grid workaround will certainly work for now. Thanks. $\endgroup$ – GFurnas Jun 7 '16 at 21:08
  • $\begingroup$ To close voters, what is a simple mistake here? $\endgroup$ – Kuba Jun 10 '16 at 5:36

For some reason (I suspect a bug), you must give the Spacings specification that is wrapped by SlideView in full form; i.e., a list of two elements. If you do that it will work.

Row @
    Row @
      {Framed @ Column[{1, 2, 3}, Center, Spacings -> vspace], 
         {Framed @ Column[{1, 2, 3}, Center, Spacings -> {Automatic, vspace}]}], 
       "   "},
    {vspace, {0, 1, 2}}]


  • $\begingroup$ I find this problem interesting because it overwrites options given explicitly to the function, from outside. This is useful if it is general. Didn't have time to dig though. $\endgroup$ – Kuba Jun 10 '16 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.