帮助 Tikz 绘制带有波浪边的图形

帮助 Tikz 绘制带有波浪边的图形

在我的工作中,有以下类型的图表案例分析:

图形

我是 Ti 奇妙世界的新成员Z 和我尝试了以下方法:

\begin{tikzpicture}[every node/.style={circle, draw, scale=.6}, scale=.5, rotate = 180, xscale = -1]
\node [draw,shape=circle](one) at (0,0) {};
\node[draw,shape=circle] (two) at (-2,2) {};
\node [draw,shape=circle](three) at (0,4) {};
\node [draw,shape=circle](four) at (2,2) {};
\node[draw,shape=circle] (five) at (0,1) {};
\node [draw, shape=circle] (six) at (0,2) {};
\node [draw, shape=circle] (seven) at (0,3) {};

\draw (one) --  (two) -- (three) -- (four) -- (one);
\draw (four) -- (six);

\draw (six) 
to [out=45, in =315] (seven);
\draw (seven) to [out=225, in=135] (five) -- (two);
\draw (three) -- (seven);


\end{tikzpicture}

结果:

TikZ 输出

我的问题是:

  1. 如何获取波浪形路径(在某些情况下为虚线/点线)?
  2. 我的图怎么倒过来了?

答案1

\documentclass{scrartcl}
\usepackage{tikz}

\usetikzlibrary{snakes}

\begin{document}
\begin{tikzpicture}[every node/.style={circle, draw, scale=.6}]
  \node [draw,shape=circle](one) at (0,0) {};
  \node[draw,shape=circle] (two) at (-2,2) {};
  \node [draw,shape=circle](three) at (0,4) {};
  \node [draw,shape=circle](four) at (2,2) {};
  \node[draw,shape=circle] (five) at (0,1) {};
  \node [draw, shape=circle] (six) at (0,2) {};
  \node [draw, shape=circle] (seven) at (0,3) {};

  \draw (one) --  (two) -- (three) -- (four) -- (one);
  \draw (four) -- (six);

  \draw (six)   to [bend right=45] (seven);
  \draw (seven) to [bend right=45] (five);
  \draw (five) -- (two);
  \draw (three) -- (seven);

  \tikzset{decoration={snake,amplitude=.4mm,segment length=2mm,
                       post length=0mm,pre length=0mm}}
  \draw[decorate] (one) -- (five);
  \draw[decorate] (five) -- (six);
  \draw[decorate] (six) -- (seven);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容