# How to use Show with Rotate

The following use of Show produces an error (Could not combine the graphics objects in Show) even though the two graphics objects are constructed just fine.

g1 = Graphics[{Line[{{0, 0}, {0, 1}, {1, 1}}]}]
g2 = Rotate[g1, \[Pi]]
Show[{g1, g2}]


Can Show somehow be used to combine graphics objects, where some are rotated?

Note: even Show[{g2}] fails.

Or take the graphic details with First, Rotate them, then plot again with Graphic:

    g1 = Graphics[{Line[{{0, 0}, {0, 1}, {1, 1}}]}]
g2 = Graphics[Rotate[First@g1, \[Pi]]]
Show[{g1, g2}]

• Thanks. This gives a more accurate layout than Overlay. – Alan Dec 7 '15 at 22:01

g2 has head Rotate, so use Overlay

Overlay[{g1, g2}] For 3D figure, if the function Overlay is used, the obtained figure is two dimensional. It cann't be rotated using the mouse. To solve this problem, we can take other methodes. Giving an example

myBox = Graphics3D[Cuboid[{-40, 40, 0}, {40, 60, 10}]];

myBox = Graphics3D[Rotate[myBox[], Pi/4, {0, 0, 1}, {0, 0, 0}]]


Then, you can use the Show[]. It is very simple. You can do like this to apply to other situations.

• This is what accepted answer uses, is it not? – Kuba Jan 18 '18 at 12:16
• Aming at the above answer, just for a clearer explanation of the problems of the Overlay and a clear answer to the 3D figure. – laizhianzhi Jan 19 '18 at 0:56
• I keep reading MyBox in this thread and it keeps appearing in the SERPs for Self Storage searches. Any Chance we can remove this keyword from this thread or make this page noindex? – Jay Jan 27 '18 at 18:44