1 of 4
Fabio
  • 1.4k
  • 7
  • 13

Spacing in Grid/GraphicsGrid

I need to use the following code to generate the plot

fDD[\[Omega]_, 
   c_, \[Rho]_, \[Alpha]_] := ((2 - 2 c^2 \[Rho]^2) Sin[
      c \[Alpha] \[Omega]] + (1 + 
       c \[Rho])^2 Sin[(1 + (-1 + c) \[Alpha]) \[Omega]] + (-1 + 
       c \[Rho])^2 Sin[(-1 + \[Alpha] + c \[Alpha]) \[Omega]]);
fNN[\[Omega]_, 
   c_, \[Rho]_, \[Alpha]_] := (2 (-1 + c^2 \[Rho]^2) Sin[
      c \[Alpha] \[Omega]] + (1 + 
       c \[Rho])^2 Sin[(1 + (-1 + c) \[Alpha]) \[Omega]] + (-1 + 
       c \[Rho])^2 Sin[(-1 + \[Alpha] + c \[Alpha]) \[Omega]]);
fRR[\[Omega]_, 
   c_, \[Rho]_, \[Alpha]_] := (2 (-1 + \[Beta]^2) (-1 + 
       c^2 \[Rho]^2) Sin[
      c \[Alpha] \[Omega]] + (1 + \[Beta]^2) ((1 + 
          c \[Rho])^2 Sin[(1 + (-1 + c) \[Alpha]) \[Omega]] + (-1 + 
          c \[Rho])^2 Sin[(-1 + \[Alpha] + c \[Alpha]) \[Omega]]));
pp = 20;

fig = Grid[Table[
   Show[
    ContourPlot[
     fDD[\[Omega], c, \[Rho], \[Alpha]] == 0, {\[Omega], 0, 
      5.5 \[Pi]}, {\[Alpha], 0, 1}, PlotPoints -> pp, 
     ContourStyle -> {Red, Thickness[0.003]}, PlotRange -> All],
    ContourPlot[(fRR[\[Omega], c, \[Rho], \[Alpha]] /. \[Beta] -> 
         0.5) == 0, {\[Omega], 0, 5.5 \[Pi]}, {\[Alpha], 0, 1}, 
     PlotPoints -> pp, ContourStyle -> {Orange, Thickness[0.003]}, 
     PlotRange -> All],
    ContourPlot[(fRR[\[Omega], c, \[Rho], \[Alpha]] /. \[Beta] -> 
         1) == 0, {\[Omega], 0, 5.5 \[Pi]}, {\[Alpha], 0, 1}, 
     PlotPoints -> pp, ContourStyle -> {Green, Thickness[0.003]}, 
     PlotRange -> All],
    ContourPlot[(fRR[\[Omega], c, \[Rho], \[Alpha]] /. \[Beta] -> 
         2) == 0, {\[Omega], 0, 5.5 \[Pi]}, {\[Alpha], 0, 1}, 
     PlotPoints -> pp, ContourStyle -> {Blue, Thickness[0.003]}, 
     PlotRange -> All],
    ContourPlot[
     fNN[\[Omega], c, \[Rho], \[Alpha]] == 0, {\[Omega], 0, 
      5.5 \[Pi]}, {\[Alpha], 0, 1}, PlotPoints -> pp, 
     ContourStyle -> {Purple, Thickness[0.003]}, PlotRange -> All],
    AspectRatio -> 1/GoldenRatio, BaseStyle -> {FontSize -> 15}, 
    ImageSize -> 400, PlotRange -> {{0, 5.5 \[Pi]}, {0, 1}},
    FrameLabel -> {{Style["\[Alpha]", If[c > 0.5, White, Black]], 
       None}, {Style["\[Omega]/\[Pi]", If[\[Rho] < 2, White, Black]], 
       None}},
    FrameTicks -> {{Table[{y, 
         NumberForm[Style[y, If[c > 0.5, White, Black]], {2, 1}]}, {y,
          0, 1, 0.2}], 
       Table[{y, ""}, {y, 0, 1, 0.2}]}, {Table[{x \[Pi], 
         Style[x, If[\[Rho] < 2, White, Black]]}, {x, 0, 8, 1}], 
       Table[{x \[Pi], ""}, {x, 0, 8, 1}]}},
    Epilog -> 
     Inset[Framed[
       Row@{"\[Rho] = ", NumberForm[\[Rho], {1, 1}], ", c = ", 
         NumberForm[c, {1, 1}]}, 
       BoxFrame -> {{0.25, 0.25}, {0.25, 0.25}}], {4.6 \[Pi], 0.92}, 
      Background -> White], Background -> Transparent
    ], {\[Rho], {0.5, 1, 2}}, {c, {0.5, 1, 2}}
   ], Spacings -> {-0.3, -2.5}, Frame -> None, 
  Background -> Transparent
  ]

can the space between the picture be reduced? I know that the problem is in using "ghost" labels. Does someone has an alternative solution?

Thanks, Fabio

Fabio
  • 1.4k
  • 7
  • 13