以下是 MWE:
\documentclass[a4paper,english,hebrew,numbers=noenddot]{scrartcl}
\usepackage{amsmath}
\usepackage{amsthm,tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}
% Nodes:
\node (s) at (-2,0) {$\bullet$};
\node (a1) at (-1, 2) {$\bullet$};
\node [opacity=0.2] (e) at (2,0) {$\star$};
% Paths:
\draw [->] plot coordinates {(s) (e)};
\draw[blue,dotted,->] plot[smooth,tension=0.5, left] coordinates {(s) (a1) (e)};
\end{tikzpicture}
\par\end{center}
\end{document}
有一种方式是路径在节点附近结束,并且不是里面有吗?
我试过类似的东西outer sep
,但没用 :-(
感谢您的帮助!
答案1
答案2
或者,您可以将north west
节点的锚点指定e
为箭头的目标。然后您可以使用inner sep
节点e
调整距离。
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
% Nodes:
\node (s) at (-2,0) {$\bullet$};
\node (a1) at (-1, 2) {$\bullet$};
\node [opacity=0.2,inner sep=0pt] (e) at (2,0) {$\star$};
% Paths:
\draw [->] plot coordinates {(s) (e)};
\draw[blue,dotted,->] plot[smooth,tension=0.5, left] coordinates {(s) (a1) (e.north west)};
\end{tikzpicture}
\end{document}