1
$\begingroup$

I am using GraphicsGrid to produce the following figure:

Plot1 = Plot[Exp[-0.03*t], {t, 0, 300}, 
   AxesLabel -> {None, "testing1"}];

GraphicsGrid[{{Plot1}, {Plot1}}]

Is there a way to control how much space is between the two plots?

$\endgroup$
1
  • 6
    $\begingroup$ Spacings -> -2 $\endgroup$
    – cvgmt
    Apr 18, 2022 at 3:51

1 Answer 1

2
$\begingroup$

cvgmt gave you the answer, but I would like to elaborate a bit. When using GraphicsGrid the pain has to do with the AspectRatio if I am not mistaken. Instead you can use Grid. Using Grid is not a golden hammer and it has its downsides from certain points of view; I think that every time I have used it I had to adjust the ImageSize, but I still find it easier to manipulate in most situations. I suggest that you experiment a little bit in each given situation.

Below I am giving 3 alternatives.

Plot1 = Plot[Exp[-0.03*t], {t, 0, 300}, 
   AxesLabel -> {None, "testing1"}];
GraphicsGrid[{{Plot1}, {Plot1}}, Spacings -> 0, 
 AspectRatio -> 1/GoldenRatio]

graphicsgrid

Plot1 = Plot[Exp[-0.03*t], {t, 0, 300}, 
  AxesLabel -> {None, "testing1"}, ImageSize -> Medium];
Grid[{{Plot1}, {Plot1}}, Spacings -> {0, 0}]

grid

ResourceFunction["PlotGrid"][{{Plot1}, {Plot1}}, Spacings -> 25]

resource

$\endgroup$
2
  • $\begingroup$ Thank you so much!! $\endgroup$
    – MathIsHard
    Apr 18, 2022 at 4:08
  • $\begingroup$ @mathbioguy glad I was able to help :) thanks for the accept $\endgroup$
    – bmf
    Apr 18, 2022 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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