有人能帮忙画一下这种图表吗?

有人能帮忙画一下这种图表吗?

有人能帮忙画出图中所示的带有边缘交叉的图形吗?我费了好大劲才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}

在此处输入图片描述

相关内容