我想在曲线上添加一个反向弧形倒钩尖,以标记不连续性。虽然这在线的末端(而不是曲线)工作得很好,但在曲线末端水平反转倒钩尖会导致曲线略微与钩子交叉,如下所示:
\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}