在我的工作中,有以下类型的图表案例分析:
我是 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}
结果:
我的问题是:
- 如何获取波浪形路径(在某些情况下为虚线/点线)?
- 我的图怎么倒过来了?
答案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}