0

When combining two graphics with Show, the final image is clipped. Why is this happening and how to fix it?

n := 9;
s3 = Sqrt[3];
baseuptriangle = {{0, 0}, {1, s3}, {2, 0}};
radius := 2/Sqrt[3];
(* p is a set of pink triangles*) 
p = Table[
   Table[
    Polygon[{2 j - i, s3 i} + # & /@ baseuptriangle], {j, i, 
     n - 2}], {i, 0, n - 2}];
latticepoints := 
  DeleteDuplicates[Flatten[PolygonCoordinates /@ Flatten[p], 1]];
plot1 = ListPlot[latticepoints, PlotStyle -> {Black}, Axes -> False, 
   AspectRatio -> 1];
hexagonsnew = 
  Rotate[RegularPolygon[#, radius, 6], 30 Degree] & /@ latticepoints;
plot4 = Graphics[{Pink, Opacity[0.5], EdgeForm[Red], hexagonsnew}]
Show[plot1, plot4, AspectRatio -> 1]

enter image description here

enter image description here

  • Welcome to the Mathematica Stack Exchange. Show[plot4, plot1, AspectRatio -> 1] should fix it as plot4 spans a larger area and the Show command adopts options from the first plot. – Syed May 18 '22 at 16:40
  • 2
    If the linked question does not suit your needs, please edit your question to explain why. In the meantime, try using Show[plot1, plot4, AspectRatio -> 1, PlotRange -> All]. – J. M.'s missing motivation May 18 '22 at 17:13

0 Answers0