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

  • Thread starter Thread starter sara_87
  • Start date Start date
  • Tags Tags
    Drawing Latex
Click For Summary
SUMMARY

The discussion focuses on drawing an arrow between two graphs in LaTeX using the TikZ package. The user initially attempted to use the TikZ command \draw[dashed, o->] to create an arrow but found it did not appear on the graphs. The solution provided involves using the overlay option with TikZ: \tikz[overlay,remember picture] to successfully position the arrow on the graph. Additionally, users are encouraged to refer to TeXample.net for more TikZ examples and overlays.

PREREQUISITES
  • Familiarity with LaTeX document preparation system
  • Basic understanding of the TikZ package for creating graphics
  • Knowledge of how to include graphics in LaTeX using \includegraphics
  • Understanding of coordinate systems in TikZ for positioning elements
NEXT STEPS
  • Explore advanced TikZ features for creating complex diagrams
  • Learn about the overlay option in TikZ for positioning elements
  • Investigate TeXample.net for additional TikZ examples and templates
  • Practice creating compilable LaTeX examples that incorporate multiple graphics
USEFUL FOR

LaTeX users, graphic designers, and anyone looking to enhance their document presentations with arrows and annotations between figures using TikZ.

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
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 0 ·
Replies
0
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K