1
$\begingroup$

If I have stored 6 different figures in a command "decon" so that if I use decon[[1]] I plot the first figure and if I use decon[[2]] I plot the second figure and so on. The "decon" storage of the figures was obtained using the command AppendTo

Question:

Given this, how can I organize the figures in columns and put them with "a", "b", "c" and so on as the figure below for my an example of 4 particular figures (I would like all 6 of them in the same fashion):

enter image description here

If I use Grid[{decon[[1 ;; 2]], decon[[3 ;; 4]]}] as suggested by @Jagra, I get very compacted plots where it is difficult to see them:

enter image description here

How can i solve this?

$\endgroup$
1
  • $\begingroup$ Using "GraphicsGrid", you may write e.g.: gr = Table[ Plot[Sin[i x], {x, 0, Pi}, Epilog -> Inset[StringForm["Number= ``", i], {.4, 1}]], {i, 4}]; GraphicsGrid[Partition[gr, 2]] $\endgroup$ – Daniel Huber Nov 1 '20 at 19:55
4
$\begingroup$
decon 

enter image description here

Grid[{
  decon[[1 ;; 2]],
  decon[[3 ;; 4]]
  }]

enter image description here

ResourceFunction, PlotGrid can give you additional functionality. (Nod to: @ Rohit's answer to: Stacked time series plot)

As example, which you can apply...

ResourceFunction["PlotGrid"][
 {
  {Plot[x, {x, 0, 1}, Frame -> True, PlotLabel -> "Some Label"],
   Plot[x, {x, 0, 1}, Frame -> True, PlotLabel -> "Some Label"]},
  {Plot[x^2, {x, 0, 1}, Frame -> True, PlotLabel -> "Some Label"],
   Plot[x^2, {x, 0, 1}, Frame -> True, PlotLabel -> "Some Label"]}
  }, Spacings -> {0, 30}
 ]

The ResourceFunction for PlotGrid makes some things easier related to having rows or columns of plots share axis information if you want something like that.

enter image description here

$\endgroup$
5
  • $\begingroup$ Hi Jagra! Thank you for your answer. When I use that I get very compacted plots (see above where I edited my question to include your answer). How can I solve this? $\endgroup$ – John Nov 1 '20 at 20:24
  • 1
    $\begingroup$ @John, simply set ImageSize of the Plots to a size you want. $\endgroup$ – Jagra Nov 1 '20 at 20:38
  • $\begingroup$ Thank you very much Jagra. It works ! $\endgroup$ – John Nov 1 '20 at 20:50
  • $\begingroup$ Jagra, it might be useful for others to see how PlotGrid can automate the labeling too. Just a suggestion that if you could clarify how this might be possible, it would be useful to others? $\endgroup$ – CA Trevillian Nov 22 '20 at 6:40
  • $\begingroup$ @CATrevillian -- Interesting, but I can't say I've looked at doing it. If you you have, feel free to add to the answer to improve it. $\endgroup$ – Jagra Nov 22 '20 at 17:36
2
$\begingroup$

Normally, display functions such as Column, Grid and Row automatically reduce the size of graphics. However, there's a simple option, ImageSizeMultipliers, that adjusts the size of the graphics. For example, Grid normally reduces the size of graphics:

SeedRandom[123]
{g1, g2, g3, g4} = 
  Table[ListPlot[RandomReal[10, {20, 2}], Joined -> True], {i, 4}];
Grid[{{g1, g2}, {g3, g4}}]

without ImageSizeMultipliers

Use the ImageSizeMultipliers style option to adjust the size of the graphics in the grid.

Grid[{{g1, g2}, {g3, g4}}, 
 BaseStyle -> ImageSizeMultipliers -> {1., 1.}]

with ImageSizeMultipliers

$\endgroup$

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.