I'll just cut to the chase. I'd like to do this:
I would think tikz is the thing to use, but I'm not sure how to make the curvy arrows. Any help would be much appreciated. Thanks!
Asked
Active
Viewed 1,159 times
-1
Ben W
- 203
1 Answers
4
The simplest code for this case
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\sffamily
\node (a) at (-2,0) {probability};
\node[align=center] (b) at (2,0) {percent\\change};
\draw[-latex] (a) to[out=60,in=120] node[midway,font=\scriptsize,above] {multiply by 100\%} (b);
\draw[-latex] (b) to[out=-120,in=-60] node[midway,font=\scriptsize,below] {divide by 100\%} (a);
\end{tikzpicture}
\end{document}
These are the best ways IMO (with \GREAT (not \great or \Great) help from Skillmon and marmot in this question)
Based on Skillmon's answer:
\documentclass[tikz]{standalone}
\usetikzlibrary{bending,decorations.text}
\begin{document}
\begin{tikzpicture}
\sffamily
\node (a) at (-2,0) {probability};
\node[align=center] (b) at (2,0) {percent\\change};
\begin{scope}
\catcode`\%=12
\draw[-latex,postaction={decorate,decoration={raise=-1.5ex,text along path,text
align=center,text={|\scriptsize|multiply by 100%}}}] (a) to[out=60,in=120] (b);
\draw[latex-,postaction={decorate,decoration={raise=.5ex,text along path,text
align=center,text={|\scriptsize|divide by 100%}}}] (a) to[out=-60,in=-120] (b);
\end{scope}
\end{tikzpicture}
\end{document}
Based on marmot's answer:
\documentclass[tikz]{standalone}
\usetikzlibrary{bending,decorations.text}
\begin{document}
\begin{tikzpicture}
\sffamily
\node (a) at (-2,0) {probability};
\node[align=center] (b) at (2,0) {percent\\change};
\draw[-latex,postaction={decorate,decoration={raise=-1.5ex,text along path,text
align=center,text={|\scriptsize|multiply by 100{\%}}}}] (a) to[out=60,in=120] (b);
\draw[latex-,postaction={decorate,decoration={raise=.5ex,text along path,text
align=center,text={|\scriptsize|divide by 100{\%}}}}] (a) to[out=-60,in=-120] (b);
\end{tikzpicture}
\end{document}
Both give


bendingthe result will become even prettier because then the arrows are taken into account for the path construction. – Mar 28 '19 at 15:24