Exporting a rasterized Row of Graphics
You can change from Row
over to Grid
, which does no linebreaking. Then you just need to add another set of curly braces around your former input row:
Rasterize[
With[{size = 250},
Grid[{Show[#, ImageSize -> {Automatic, size},
ImagePadding -> {{30, 15}, {40, 5}}] & /@ {Plot[
Sin[x], {x, -1, 1}], Plot[Sin[x], {x, -1, 1}]}}]],
ImageResolution -> 200]
Use GraphicsRow
to avoid breaking the row. You can control the resolution of your exported image with the option ImageSize -> ...
supplied directly to GraphicsRow
. This is another advantage of GraphicsRow
over Raw
- it takes ImageSize
option. Yet with most of other objects using plane Row
is more preferable.
And though I did not use Rasterize
, and exported directly, you can still use it if you want to.
Export["test.png", With[{size = 250},
GraphicsRow[Show[#, ImageSize->{Automatic, size},ImagePadding->{{30, 15}, {40, 5}}] & /@
{Plot[Sin[x], {x, -1, 1}], Plot[Sin[x], {x, -1, 1}]},Spacings-> 0]], ImageSize -> 500]
It is possible to give an explicit ImageSize
to Row
and if it is large enough to contain the graphics it will not wrap. If it is given in the form {maximum}
it will be sized automatically. Infinity
does not appear to work so I used 1*^6
:
Rasterize[
With[{size = 250},
Row[Show[#, ImageSize -> {Automatic, size},
ImagePadding -> {{30, 15}, {40, 5}}] & /@ {Plot[
Sin[x], {x, -1, 1}], Plot[Sin[x], {x, -1, 1}]},
ImageSize -> {1*^6}]],
ImageResolution -> 200]