答案1
一种简单的实现方法是使用tikz
:
\documentclass[tikz,border=4pt]{standalone}
\begin{document}
\begin{tikzpicture}[line width=.7pt, outer sep=0pt]
\foreach \x in {0,1}
\foreach \y in {0,...,3}
\draw (3*\x,2*\y) node (\x\y)[circle,fill,inner sep=1.5pt]{};
\draw (00) -- (10) (01)--(11) (03) -- (12);
\node at (1.5,5) [circle,fill=white,inner sep=2pt]{};
\draw (02) -- (13);
\end{tikzpicture}
\end{document}
答案2
另一个简短的代码,内容如下pstricks
:
\documentclass[svgnames, border=6pt]{standalone}
\usepackage{pstricks-add, multido, etoolbox}%,
\usepackage{auto-pst-pdf}
\begin{document}
\psset{linewidth=1.2pt, linecolor=SteelBlue,}
\begin{pspicture}[showgrid, gridlabelcolor=white](0,0)(3,6)
\multido{\i=0+2}{4}{\dotnodes(0,\i){A\i}(3,\i){B\i}\ifnumless{\multidocount}{3}{\ncline{A\i}{B\i}}{}}
\ncline{A6}{B4}\ncline[border=3pt]{A4}{B6}
\end{pspicture}
\end{document}
答案3
更简单的代码。
\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[bullet/.style={circle,fill,inner sep=1pt}]
\foreach \Y [count=\X]in {2,1,3,4}
{\draw[double=black,double distance=1pt,draw=white,very thick]
(-1,-\Y) node[bullet] (L\Y){} -- (1,-\X) node[bullet] (R\X){};}
\end{tikzpicture}
\end{document}