Extra spacing in GraphicsGrid
- To: mathgroup at smc.vnet.net
- Subject: [mg83433] Extra spacing in GraphicsGrid
- From: Yaroslav Bulatov <yaroslavvb at gmail.com>
- Date: Tue, 20 Nov 2007 03:54:07 -0500 (EST)
In the code below, I'm trying to position two Graphics next to each
other. However, I get excessive spacing between two graphics object
even if I set Spacing to {0,0}. The problem goes away if I Rasterize
the Graphics objects. However that is suboptimal because I need to
keep the original graphics structure.
So, is there any way to get rid of the extra spacing without
rasterizing the graphics objects first?
g = {1 -> 4, 2 -> 5, 3 -> 6, 4 -> 5, 5 -> 6, 6 -> 4};
coloredPlot[g_, chosen_] :=
Module[{},
GraphPlot[g,
VertexRenderingFunction ->
Function[{r, v}, {If[MemberQ[chosen, v], Black, Red],
Disk[r, .2]}], EdgeLabeling -> None]];
g1 = coloredPlot[g, {1}~Join~#] & /@ Subsets[Range[2, 6]] //
Partition[#, 4] & // GraphicsGrid;
g2 = coloredPlot[g, #] & /@ Subsets[Range[2, 6]] //
Partition[#, 4] & // GraphicsGrid;
GraphicsGrid[{{g1, g2}}, Spacings -> {0, 0}]
GraphicsGrid[{{Rasterize[g1], Rasterize[g2]}}, Spacings -> {30, 0}]