# Using GraphicsGrid for density plots with color scales

I would like to arrange the density plots in a certain order using GraphicsGrid. But when using GraphicsGrid, there is problem with the color scale, it doesn't display completely. How should GraphicsGrid be written so that the color scales of the density plots are displayed correctly?

ClearAll["Global*"]

f[B_] := B*(r^2 + z^2)*Sin[z]^2;

ff = Table[
DensityPlot[f[B], {r, 0, 10}, {z, -5, 5}, FrameLabel -> {r, z},
PlotLabel -> StringForm["B = ", B],
ColorFunction -> "SunsetColors", PlotPoints -> 250,
PlotLegends -> Automatic, ImageSize -> 200], {B, {0, 5, 10, 25}}]

GraphicsGrid[{{ff[[1]], ff[[3]]}, {ff[[2]], ff[[4]]}}]

• Add ImageSize -> 550 to the GraphicsGrid or use Grid instead of GraphicsGrid Sep 10 at 13:47
• @Bob Hanlon, thanks! It works Sep 11 at 10:33

Graphics and Inset give you more control, e.g.

{{f1, f3}, {f2, f4}} = {{ff[[1]], ff[[3]]}, {ff[[2]], ff[[4]]}};
{x, y} = {280, 220};
Graphics[{White, Rectangle[{0, 0}, {2 x, 2 y}],
Inset[f1, {x/2, 2 y - y/2}, Center, x],
Inset[f2, {2 x - x/2, 2 y - y/2}, Center, x],
Inset[f3, {x/2, y/2}, Center, x],
Inset[f4, {2 x - x/2, y/2}, Center, x]},
PlotRange -> {{0, 2 x}, {0, 2 y}}, ImageSize -> 2 x]
`