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

In summary, the conversation discusses how to draw an arrow from one graph to another in LaTeX using the tikz package. Suggestions are given to either use the overlay option or to draw the arrow within the graph picture itself. The conversation also mentions the availability of TikZ examples on TeXample.net.
  • #1
sara_87
763
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
  • #2
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
 

What is LaTeX and Tikz Package?

LaTeX is a typesetting language used for creating high-quality documents, especially in the fields of mathematics and science. Tikz is a package for LaTeX that allows for the creation of graphics and diagrams.

How do I draw an arrow between two graphs using Tikz Package in LaTeX?

To draw an arrow between two graphs using Tikz Package in LaTeX, you first need to specify the coordinates of the graphs and the desired location of the arrow. Then, you can use the \draw command to create the arrow between the two points.

Do I need any prior knowledge of programming to use Tikz Package for drawing arrows between graphs in LaTeX?

While some basic knowledge of programming can be helpful, it is not necessary to use Tikz Package for drawing arrows between graphs in LaTeX. The package comes with a comprehensive user manual and there are many online resources available for beginners.

Can I customize the appearance of the arrow drawn between two graphs in LaTeX using Tikz Package?

Yes, you can customize the appearance of the arrow by changing the style, color, thickness, and other properties using the \draw command in Tikz Package. You can also add labels or text to the arrow using the \node command.

Are there any alternatives to Tikz Package for drawing arrows between graphs in LaTeX?

Yes, there are other packages and tools available for drawing arrows between graphs in LaTeX, such as PSTricks and PGFPlots. However, Tikz Package is widely used and has a user-friendly interface, making it a popular choice for creating graphics and diagrams in LaTeX.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
928
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
734
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
938
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
Back
Top