# Drawing two graphics with an arrow in between

I'm trying to draw two graphics object well defined and an arrow in between pointing left to right (symbolizing the mapping between the two). I've tried drawing the arrow first in a graphics object and then using GraphicsRow but the end result is unsatisfying: I get that the arrow takes a third of the space, when I would like it much smaller. How could I get there?

• Select the graphics, Right-click, "Drawing Tools" – Dr. belisarius Dec 5 '14 at 14:58
• @belisarius: I did it this way in the past, but I would be interested in a systematic way of doing it. – Learning is a mess Dec 5 '14 at 15:06
• Then check out this. It's a nice mix of both, I believe – Dr. belisarius Dec 5 '14 at 15:24

gF = Graphics[{#[], #[], Black,
Text[Style["\[RightArrow]", 72, Bold], Scaled@{.5, 1/2}],
#2[], Translate[#2[], {3., 0}]}, ImageSize -> 500] &;

gF[{Blue, Disk[]}, {Red, Polygon[{{1, -1}, {0, Sqrt - 1}, {-1, -1}}]}] gF[{Blue, Polygon[Table[{Cos[2 \[Pi] k/6], Sin[2 \[Pi] k/6]}, {k, 0,  5}]]},
{Red,  Polygon[Table[{Cos[2 \[Pi] k/9], Sin[2 \[Pi] k/9]}, {k, 0, 8}]]}] Or

g1 = Graphics[{Blue, Disk[{0, 0}, 1]}, BaselinePosition -> Center, ImageSize -> 300];
g2 = Graphics[{Red, Polygon[{{4, -1}, {3, Sqrt - 1}, {2, -1}}]},
BaselinePosition -> Center, ImageSize -> 300];
g3 = Graphics[{Orange, Polygon[Table[{Cos[2 \[Pi] k/9], Sin[2 \[Pi] k/9]}, {k, 0, 8}]]},
BaselinePosition -> Center, ImageSize -> 300];
g4 = Graphics[Text@Style["\[RightArrow]", 64, Bold], BaselinePosition -> Center, ImageSize -> 50];

Row[{g1, g2, g3}, g4] • Thanks you, it works like a charm indeed! – Learning is a mess Dec 5 '14 at 19:45
• @Learningisamess, my pleasure. Thank you for the accept. – kglr Dec 5 '14 at 19:52

Try this:

 Manipulate[Show[{
Graphics[{Blue, Disk[{0, 0}, 1]}],
Graphics[{Red, Polygon[{{4, -1}, {3, Sqrt - 1}, {2, -1}}]}],
Graphics[{Darker@Green, Thickness[0.007],
Arrow[{{x1, y1}, {x2, y1}}]}]

}], {{x1, 1}, 0, 3}, {{y1, 0.1}, 0, 3}, {{x2, 2.5}, 0, 3}]


and play with the sliders. You should see the following: Have fun!

In practice, the output form of Rule is effective for combinations of graphics and other expressions. For example, see:

• My answer to Temporal database reconstruction (note existing rules in Association and Dataset)

• Try kguler's graphics with g1 -> g2 -> g3

• Can be used to quikly make legends for figures from Associations. Given data = <| "a" -> Red, "b" -> Blue|>, data // Normal // Column // Panel gives: Limitations include:

• The result is not a Graphics object (though often it renders to PDF just fine).

• No control over the arrow's style (or is there?)