![在曲线末端添加反弧倒钩尖](https://linux22.com/image/454460/%E5%9C%A8%E6%9B%B2%E7%BA%BF%E6%9C%AB%E7%AB%AF%E6%B7%BB%E5%8A%A0%E5%8F%8D%E5%BC%A7%E5%80%92%E9%92%A9%E5%B0%96.png)
我想在曲线上添加一个反向弧形倒钩尖,以标记不连续性。虽然这在线的末端(而不是曲线)工作得很好,但在曲线末端水平反转倒钩尖会导致曲线略微与钩子交叉,如下所示:
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\draw[black] [domain=0:2,-{Arc Barb[reversed]}, samples=100] plot (\x,0); % the curve crosses the hook
\draw[-{Arc Barb[reversed]}] (0,-1) -- (2,-1); % well-functioning plot I cannot generalise for curves
\end{tikzpicture}
\end{document}
您能帮我剪掉第一个例子中曲线的末端,或者让箭头尖端稍微往前一点吗?
答案1
您不必缩短曲线,而是可以将箭头移至末端。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\draw[black, shorten >=-2pt] [domain=0:2,-{Arc Barb[reversed]}, samples=100] plot (\x,0); % the curve crosses the hook
\draw[-{Arc Barb[reversed]}] (0,-1) -- (2,-1); % well-functioning plot I cannot generalise for curves
\end{tikzpicture}
\end{document}