带有弯曲箭头和说明的图表(可能是 tikz)

带有弯曲箭头和说明的图表(可能是 tikz)

我就直奔主题吧。我想这样做: 在此处输入图片描述 我认为可以使用 tikz,但我不确定如何制作弯曲的箭头。如能提供任何帮助,我将不胜感激。谢谢!

答案1

本案例最简单的代码

\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}

在此处输入图片描述


在我看来,这些是最好的方法(借助\GREAT(不是\great\Great斯基尔蒙土拨鼠这个问题

根据 Skillmon 的回答:

\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}

根据marmot的回答:

\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}

两者都给予

在此处输入图片描述

相关内容