Group Abstract Group Abstract

Message Boards Message Boards

Must be an easy question - 4 pictures in a grid - without unwanted borders

Posted 10 years ago
4 Replies

3 lines as material to work with:

rr = Plot[Sin[x], {x, 0, 10}, Background -> Brown]
ar = Table[rr, {3}, {3}];
gr = Grid[ar, Frame -> All, FrameStyle -> Directive[{Thickness[3], Red}], Spacings -> {0, 0}]

Evaluate

Export["pic.gif", gr, "GIF"]
Export["pic.png", gr, "PNG"]
Export["pic.svg", gr, "SVG"]

enter image description here

A normal export without any cloud involved shows already the artifact. If a setting of Background->Brown is used in the Export is shows:

enter image description here

There is a way to remove the stitching error.

as = ImagePad[ImageAssemble[ar],2,Red]
CloudExport[as, "GIF"]

The picture is now stitched with ImageAssemble and a border is added with ImagePad. The result is a perfect picture.

Note: I was under the impression that CloudDeploy didn't produce the stitching artifacts but it also does when grid with pictures is mixed.

the ImageAssembled picture is 1 big picture while the Grid solution contains 9 individual pictures. So my question is if it is possible to mix Grid and Images without stitching errors or is it impossible to mix. Do I gain load time of the page with this?

I don't have the means (I think) to cloud deploy. When I just export the image to my desktop, I see no lines.

However, you might try applying the Background option to Grid[], rather than the plots. This should make the problem go away. I encountered similar problems, and this change fixed them.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard