Drawing an Arrow between Two Graphs in LaTeX | Tikz Package Solution

  • Context: LaTeX 
  • Thread starter Thread starter sara_87
  • Start date Start date
  • Tags Tags
    Drawing Latex
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 5K views
sara_87
Messages
748
Reaction score
0

Homework Statement



I have 2 graphs in latex, side by side, that were attached using:
\includegraphics
I want to draw an arrow going from the middle of the first graph to the middle of the second graph.

Homework Equations





The Attempt at a Solution


I tried using the tikz package:

\begin{tikzpicture}
\draw[dashed, o->] (2,4) -- (10,4);
\end{tikzpicture}

but this doesn't draw the arrow ON the graph. I want an arrow to be literally on the graph pointing to the graph next to it.

Does anyone have any ideas how to do this?

Thank you in advance.
 
Physics news on Phys.org
Hi Sara,

use the overlay option to draw on the graph:

Code:
\tikz[overlay,remember picture] {
    \draw[dashed, o->] (2,4) -- (10,4); 
}

or draw the arrow within the graph picture itself. Btw. you can find many TikZ examples, also with overlays, on TeXample.net in the TikZ gallery. If you show a compilable example containing your graph, I can show you how to place the desired arrow there.

Stefan