I have this code:
basep = Plot[{p[x, y, t, baseta, f, basefa, baseul]*150}, {x, 0, basexhat}, PlotLabel -> "Rental price per m^2", PlotStyle -> {Opacity[0.5]}]
baseq = Plot[{q[x, y, t, baseta, f, basefa, baseul]}, {x, 0, basexhat}, PlotLabel -> "Dwelling size", PlotStyle -> {Opacity[0.5]}]
baser = Plot[{r[x, y, t, baseta, f, basefa, baseul]*150}, {x, 0, basexhat}, PlotLabel -> "Land rental price per m^2", PlotStyle -> {Opacity[0.5]}]
baseh = Plot[{h[x, y, t, baseta, f, basefa, baseul]}, {x, 0, basexhat}, PlotLabel -> "Floor to area ratio", PlotStyle -> {Opacity[0.5]}]
baseDen = Plot[{Den[x, y, t, baseta, f, basefa, baseul]*10}, {x, 0, basexhat}, PlotLabel -> "Population density", PlotStyle -> {Opacity[0.5]}]
baseL = Plot[{L[x, y, t, baseta, f, basefa, baseul]/1000}, {x, 0, basexhat}, PlotLabel -> "Population (1000s)", PlotStyle -> {Opacity[0.5]}, Epilog -> {Dashed, LightBlue,
Line[{{basexhat, 0}, {basexhat, 600}}], Dashed, LightBlue,
Line[{{lastxhat, 0}, {lastxhat, 600}}]}]
lastp = Plot[{p[x, y, t, lastta, f, lastfa, lastul]*150}, {x, 0, lastxhat}, PlotLabel -> "Rental price per m^2"]
lastq = Plot[{q[x, y, t, lastta, f, lastfa, lastul]}, {x, 0, lastxhat}, PlotLabel -> "Dwelling size"]
lastr = Plot[{r[x, y, t, lastta, f, lastfa, lastul]*150}, {x, 0, lastxhat}, PlotLabel -> "Land rental price per m^2"]
lasth = Plot[{h[x, y, t, lastta, f, lastfa, lastul]}, {x, 0, lastxhat}, PlotLabel -> "Floor to area ratio"]
lastDen = Plot[{Den[x, y, t, lastta, f, lastfa, lastul]*10}, {x, 0, lastxhat}, PlotLabel -> "Population density"]
lastL = Plot[{L[x, y, t, lastta, f, lastfa, lastul]/1000}, {x, 0, lastxhat}, PlotLabel -> "Population (1000s)"]
ResourceFunction["PlotGrid"][{
{Show[basep, lastp, PlotRange -> {{0, 25}, All}, Frame -> True],
Show[baseq, lastq, PlotRange -> {{0, 25}, {73, 78}},
AxesOrigin -> {0, 0}, Frame -> True,
FrameTicks -> {{None, All}, {None, None}}]},
{Show[baser, lastr, PlotRange -> {{0, 25}, All}, Frame -> True],
Show[baseh, lasth, PlotRange -> {{0, 25}, All}, Frame -> True,
FrameTicks -> {{None, All}, {None, None}}]},
{Show[baseDen, lastDen, PlotRange -> {{0, 25}, All}, Frame -> True],
Show[baseL, lastL, PlotRange -> {{0, 25}, All}, Frame -> True,
FrameTicks -> {{None, All}, {None, None}}]}}]
And I get this beautiful grid:
Except the labels are in odd locations. How do I move them within the graphs?
Plot
useEpilog
option to addText
where you want it. $\endgroup$Epilog
perPlot
, it can contain everything.Epilog -> {Text[lbl, pos], ...}
$\endgroup$