I have a grid of density plots, say something like:
GraphicsGrid[Partition[Table[
DensityPlot[Sin[i x] Sin[y/i], {x, -4, 4}, {y, -3, 3}],
{i, 1, 4}], 2]]
I want to show a color legend bar next to this plot. I know that the option PlotLegends -> Automatic
does this for a single density plot, so if I do
GraphicsGrid[Partition[Table[
DensityPlot[Sin[i x] Sin[y/i], {x, -4, 4}, {y, -3, 3}, PlotLegends -> Automatic],
{i, 1, 4}], 2]]
I get the same color legend bar repeated four times, one for each density plot. But naturally what I want is to show a single bar common to all the density plots in the GraphicsGrid
. How do I do this?