![有人能帮忙画一下这种图表吗?](https://linux22.com/image/308252/%E6%9C%89%E4%BA%BA%E8%83%BD%E5%B8%AE%E5%BF%99%E7%94%BB%E4%B8%80%E4%B8%8B%E8%BF%99%E7%A7%8D%E5%9B%BE%E8%A1%A8%E5%90%97%EF%BC%9F.png)
有人能帮忙画出图中所示的带有边缘交叉的图形吗?我费了好大劲才pstricks
开始学习,tikz
但还是画不出来。请帮忙,因为我不知道如何使用点或坐标来画出与现有边缘相交的虚线边缘。任何包都可以。
答案1
这应该可以让你开始。仅使用tikz
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{mynode/.style={draw,circle,minimum size=6mm}
}
\begin{document}
\begin{tikzpicture}
\node[mynode] (a) {A};
\node[mynode,below left=2cm and 2cm of a] (c) {C};
\node[mynode,below right=2cm and 2cm of c] (f) {F};
\node[mynode,right=3cm of a] (b) {B};
\node[mynode,below right=2cm and 2cm of b] (d) {D};
\node[mynode,below left=2cm and 2cm of d] (e) {E};
%% lines
\draw[thick] (a) -- node[above left]{a} (c);
\draw[thick] (c) -- node[below left]{c} (f);
\draw[thick] (a) -- node[above right]{e} node[below left]{g} (e);
\draw[thick] (b) -- node[above=3mm]{i} (d)node[pos=0.5,sloped](i){};
\draw[thick] (d) -- node[above left]{h} (e);
\draw[dashed,thick,shorten >= 2cm,shorten <= -2cm] (i.north) -- (i.south);
\end{tikzpicture}
\medskip
\begin{tikzpicture}
\node[mynode] (a) {A};
\node[mynode,below left=2cm and 2cm of a] (c) {C};
\node[mynode,below right=2cm and 2cm of c] (f) {F};
\node[mynode,right=3cm of a] (b) {B};
\node[mynode,below right=2cm and 2cm of b] (d) {D};
\node[mynode,below left=2cm and 2cm of d] (e) {E};
%% lines
\draw[thick] (a) -- node[above left]{a} (c);
\draw[thick] (c) -- node[below left]{c} (f);
\draw[thick] (a) -- node[above right]{e} node[below left]{g} (e);
\draw[thick] (b) -- node[above right]{i} (d);
\draw[thick] (d) -- node[above=3mm]{h} (e)node[pos=0.5,sloped](i){};
\draw[dashed,thick,shorten >= 2cm,shorten <= -2cm] (i.north) -- (i.south);
\end{tikzpicture}
\end{document}