1

I want to add connecting arrows gradually to a picture. I have so far a straight arrow with manual position, for example, from the e to the I of the figure.

How can I add curved arrows with more intuitive coordinates within the picture? Thank you!

\documentclass[t,aspectratio=169]{beamer}
\usetheme{metropolis}

\usepackage{tikz} \usepackage{graphicx} \usepackage{xcolor}

\begin{document}

\begin{frame}[c,plain] \frametitle{New}

\begin{tikzpicture}[remember picture,overlay] \node at (current page.center) {\includegraphics[width=0.4\textwidth]{example-image}}; \draw<2->[thick, -latex, red] (8,1) to (7,2) to (6,1); \end{tikzpicture}

\end{frame}%

\end{document}

fig1

fig2

Andre
  • 969
  • The method is explained here: https://tex.stackexchange.com/questions/9559/drawing-on-an-image-with-tikz – AndréC May 06 '23 at 19:54
  • The link is useful, but I am looking for connecting two points in the figure with a curved arrow using the coordinates of the figure – Andre May 06 '23 at 21:02
  • Give already a compilable code with a straight arrow, there are several ways to curve the arrows with Tikz. You will have several answers, you choose the one that suits you. – AndréC May 07 '23 at 18:17
  • I could not find an example. Especially, an example that uses the coordinates within the figure to draw curves with arrows in an intuitive way. I intend to draw several arrows over a more complex image. If you know easily how to do this, an answer would be appreciated – Andre May 07 '23 at 20:53
  • I have already accepted the answer of AndréC, but if you, other users, know other examples or have hints on how to find the tikz coordinates in the image, it will be good to have your answer, too – Andre May 09 '23 at 15:34

1 Answers1

2

Here are several methods for bending arrows:

1 With the rounded corners option

\documentclass[t,aspectratio=169]{beamer}
\usetheme{metropolis}

\usepackage{tikz} \usepackage{graphicx} \usepackage{xcolor}

\begin{document}

\begin{frame}[c,plain] \frametitle{New}

\begin{tikzpicture}[remember picture,overlay] \node at (current page.center) {\includegraphics[width=0.4\textwidth]{example-image}}; \draw<2->[thick, -latex, red,rounded corners=5mm] (8,1) to (7,2) to (6,1); \end{tikzpicture}

\end{frame}%

\end{document}

example 1

2 With the Curve-To Operation

\documentclass[t,aspectratio=169]{beamer}
\usetheme{metropolis}

\usepackage{tikz} \usepackage{graphicx} \usepackage{xcolor}

\begin{document}

\begin{frame}[c,plain] \frametitle{New}

\begin{tikzpicture}[remember picture,overlay] \node at (current page.center) {\includegraphics[width=0.4\textwidth]{example-image}}; \draw<2->[thick, -latex, red] (8,1) to[out=80,in=50] (6,1); \end{tikzpicture}

\end{frame}%

\end{document}

example 2

3 With The Curve-To style (Bézier curves)

\documentclass[t,aspectratio=169]{beamer}
\usetheme{metropolis}

\usepackage{tikz} \usepackage{graphicx} \usepackage{xcolor}

\begin{document}

\begin{frame}[c,plain] \frametitle{New}

\begin{tikzpicture}[remember picture,overlay] \node at (current page.center) {\includegraphics[width=0.4\textwidth]{example-image}}; \draw<2->[thick, -latex, red] (8,1) to [controls=+(70:1) and +(40:2)] (6,1); \end{tikzpicture}

\end{frame}%

\end{document}

example 3

4 with the option bend left

\documentclass[t,aspectratio=169]{beamer}
\usetheme{metropolis}

\usepackage{tikz} \usepackage{graphicx} \usepackage{xcolor}

\begin{document}

\begin{frame}[c,plain] \frametitle{New}

\begin{tikzpicture}[remember picture,overlay] \node at (current page.center) {\includegraphics[width=0.4\textwidth]{example-image}}; \draw<2->[thick, -latex, red] (8,1) to [bend right=70] (6,1); \end{tikzpicture}

\end{frame}%

\end{document}

example 4

AndréC
  • 24,137
  • This is very good. A comprehensive guide for the inclusion of arrows. It will be certainly useful for many. Thanks – Andre May 09 '23 at 15:30