Sometimes I have occasion to make big grids of plots. As a toy example:
lots = GraphicsGrid[
Table[With[{a = RandomInteger[{1, 17}], b = RandomInteger[{1, 17}]},
ParametricPlot[Sin[t^2] { Cos[a t], Sin[b t]}, {t, 0, 2 \[Pi]},
PlotRange->{{-1, 1}, {-1, 1}}, Frame->True]], {15}, {7}]]
Which is a 7 by 15 grid of plots. For ease of viewing, printing and wider distribution; I will often export this to a pdf.
Export["lots.pdf", lots]
This results in a completely rubbish view. You get giant text labels and a graph too small to even see. This can be rectified by fiddling with the scaling:
Export["lots.pdf", lots, ImageSize->2000]
Now the text labels are more in proportion with the graph size. But how do I know what ImageSize
should be? It depends on how big your graphic grid is, but I know not the voodoo required to get a good result.
Alternatively, how can I get the text size to be proportional to the graph size?
Answer
You should investigate in the Scaled
function:
lots = GraphicsGrid[
Table[With[{a = RandomInteger[{1, 17}],
b = RandomInteger[{1, 17}]},
ParametricPlot[Sin[t^2] {Cos[a t], Sin[b t]}, {t, 0, 2 \[Pi]},
PlotRange -> {{-1, 1}, {-1, 1}}, Frame -> True,
ImageSize -> Scaled[1]]], {15}, {7}]];
Export["lots.pdf", lots]
Comments
Post a Comment