Tikz 2 个圆圈,箭头指向彼此

Tikz 2 个圆圈,箭头指向彼此

如何才能将箭头样式改为“-> <-”而不是 -> ?

在此处输入图片描述

\node [circle, draw, fill=red] (b1) at (0,0) {};
\node [circle, draw, fill=red] (b2) at (1,0) {};
\draw[->,thick] (b1) -- (b2);

答案1

像这样吗?

\documentclass[border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,arrows}
\begin{document}

\begin{tikzpicture}[scale=1.5,> = stealth]
\node [circle, draw, fill=red] (b1) at (0,0) {};
\node [circle, draw, fill=red] (b2) at (1,0) {};
\path (b1) edge[->,thick] ($(b1)!0.5!(b2)$) 
      ($(b1)!0.5!(b2)$) edge[<-,thick] (b2);
\end{tikzpicture}

\end{document} 

在此处输入图片描述

相关内容