1

When displaying images with GraphicsRow, GraphicsColumn, and GraphicsGrid, a thin white border is added to the image. This makes it difficult to pad the image.

An example: example1

Is there a way to remove the border? Setting ImageMargins or ImagePadding to 0 does not work.

Code to reproduce the issue:

GraphicsRow[Table[Graphics@Disk[], 3], Background -> Blue] // 
 ImagePad[#, 50, Blue] & 

enter image description here

mikabozu
  • 403
  • 3
  • 7

1 Answers1

1

The solution, provided by Bob Hanlon in the comments, is to set PlotRangePadding -> None. From the documentation:

"By default, 2% of padding is added to the plot range in each direction"

GraphicsRow[Table[Graphics@Disk[], 3], Background -> Blue, 
  PlotRangePadding -> None] // ImagePad[#, 50, Blue] &

fixed image

Another option, mentioned by J.W Kang in the comments is to use ImageCrop. This function will "remove borders of uniform color," ridding us of the pesky white border.

mikabozu
  • 403
  • 3
  • 7