I want to combine graphics and non-graphics items in a Grid
and export the result to an image file (e.g., png). There are good reasons not to use GraphicsGrid
, see, e.g., this and this post. But how can I control the vertical spacing between the rows? Here is one example:
im = Grid[{{1, 2, 3}, {Graphics[Circle[]], Graphics[Circle[]],
Graphics[Circle[]]}, {4, 5, 6}}, Spacings -> {0, 0}]
Looks good in the notebook:
but not when I export it
Export["test.png", im, ImageResolution -> 500];
How can I export it just as it is shown in the notebook?
I tried:
Export["/home/felix/test.png", im, ImageResolution -> 500,
ImageSize -> {2000, 1000}, AspectRatio -> 1/2];
yielding a distorted image and AspectRatio
has no effect:
Magnify
, or at least that function also exhibits the problem. $\endgroup$3
inMagnify[im, 3]
leads to the same distortion. Similarly,ImageResolution->200
works fine,ImageResolution->300
doesn't. As a workaround, is there another way to "magnify" the result to obtain a decent resolution without running into this problem? $\endgroup$ImageSizeMultipliers -> 1
and/or playing withItemSize
? Providing explicitImageSize
for everyGraphics
? $\endgroup$