我想要制作以下哈斯图:
因此我开始编写以下命令:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=0.7]
\node (6) at (0,10) {$\{4,3,2,1\}$};
\node (5dot1) at (-6,8) {$\{4,3,1,2\}$};
\node (5dot2) at (-3,8) {$\{4,2,3,1\}$};
\node (5dot3) at (0,8) {$\{3,4,2,1\}$};
\node (4dot1) at (-9,6) {$\{4,1,3,2\}$};
\node (4dot2) at (-6,6) {$\{4,2,1,3\}$};
\node (4dot3) at (-3,6) {$\{3,4,1,2\}$};
\node (4dot4) at (0,6) {$\{2,4,3,1\}$};
\node (4dot5) at (3,6) {$\{3,2,4,1\}$};
\node (3dot1) at (-14,4) {$\{1,4,3,2\}$};
\node (3dot2) at (-11,4) {$\{4,1,2,3\}$};
\node (3dot3) at (-8,4) {$\{2,4,1,3\}$};
\node (3dot4) at (-5,4) {$\{3,1,4,2\}$};
\node (3dot5) at (-2,4) {$\{3,2,1,4\}$};
\node (3dot6) at (1,4) {$\{2,3,1,4\}$};
\node (2dot1) at (-11,2) {$\{1,4,2,3\}$};
\node (2dot2) at (-6,2) {$\{1,3,4,2\}$};
\node (2dot3) at (-3,2) {$\{2,1,4,3\}$};
\node (2dot4) at (0,2) {$\{3,1,2,4\}$};
\node (2dot5) at (3,4) {$\{2,3,1,4\}$};
\node (1dot1) at (-6,0) {$\{1,2,4,3\}$};
\node (1dot2) at (-3,0) {$\{1,3,2,4\}$};
\node (1dot3) at (0,0) {$\{2,1,3,4\}$};
\node (0) at (0,-2) {$\{1,2,3,4\}$};
\draw (0) -- (1dot1) -- (2dot1) -- (3dot1) -- (4dot1) -- (5dot1) -- (6) -- (5dot2)-- (4dot2)--(3dot2)--(2dot1);
\end{tikzpicture}
\end{document}
问题是我无法使用这种样式制作单独的链条,因此我正在寻找更好的方法来制作所有链条。
答案1
我想到了一个无聊的解决方案:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=0.7]
\node (6) at (-3,10) {$\{4,3,2,1\}$};
\node (5dot1) at (-6,8) {$\{4,3,1,2\}$};
\node (5dot2) at (-3,8) {$\{4,2,3,1\}$};
\node (5dot3) at (0,8) {$\{3,4,2,1\}$};
\node (4dot1) at (-9,6) {$\{4,1,3,2\}$};
\node (4dot2) at (-6,6) {$\{4,2,1,3\}$};
\node (4dot3) at (-3,6) {$\{3,4,1,2\}$};
\node (4dot4) at (0,6) {$\{2,4,3,1\}$};
\node (4dot5) at (3,6) {$\{3,2,4,1\}$};
\node (3dot1) at (-14,4) {$\{1,4,3,2\}$};
\node (3dot2) at (-11,4) {$\{4,1,2,3\}$};
\node (3dot3) at (-8,4) {$\{2,4,1,3\}$};
\node (3dot4) at (-5,4) {$\{3,1,4,2\}$};
\node (3dot5) at (-2,4) {$\{3,2,1,4\}$};
\node (3dot6) at (1,4) {$\{2,3,4,1\} $};
\node (2dot1) at (-11,2) {$\{1,4,2,3\}$};
\node (2dot2) at (-6,2) {$\{1,3,4,2\}$};
\node (2dot3) at (-3,2) {$\{2,1,4,3\}$};
\node (2dot4) at (0,2) {$\{3,1,2,4\}$};
\node (2dot5) at (3,2) {$\{2,3,1,4\}$};
\node (1dot1) at (-6,0) {$\{1,2,4,3\}$};
\node (1dot2) at (-3,0) {$\{1,3,2,4\}$};
\node (1dot3) at (0,0) {$\{2,1,3,4\}$};
\node (0) at (0,-2) {$\{1,2,3,4\}$};
\draw (0) -- (1dot1) -- (2dot1) -- (3dot1) -- (4dot1) -- (5dot1) -- (6) -- (5dot2)-- (4dot2)--(3dot2)--(2dot1); (0)--(1dot1)--(2dot1)--(3dot1), (2dot1)--(3dot3);
\draw (0) -- (1dot2);
\draw (0) -- (1dot3);
\draw (1dot1) -- (2dot1);
\draw (1dot1) -- (2dot3);
\draw (1dot2) -- (2dot2);
\draw (1dot2) -- (2dot4);
\draw (1dot3) -- (2dot3);
\draw (1dot3) -- (2dot5);
\draw (2dot2) -- (3dot1);
\draw (2dot2) -- (3dot4);
\draw (2dot3) -- (3dot3);
\draw (2dot4) -- (3dot4);
\draw (2dot4) -- (3dot5);
\draw (2dot5) -- (3dot5);
\draw (2dot5) -- (3dot6);
\draw (3dot1) -- (4dot1);
\draw (3dot2) -- (4dot1);
\draw (3dot2) -- (4dot2);
\draw (3dot3) -- (4dot2);
\draw (3dot3) -- (4dot4);
\draw (3dot4) -- (4dot3);
\draw (3dot5) -- (4dot5);
\draw (3dot6) -- (4dot4);
\draw (3dot6) -- (4dot5);
\draw (4dot1) -- (5dot1);
\draw (4dot2) -- (5dot2);
\draw (4dot3) -- (5dot1);
\draw (4dot3) -- (5dot3);
\draw (4dot4) -- (5dot2);
\draw (4dot5) -- (5dot3);
\draw (5dot1) -- (6);
\draw (5dot2) -- (6);
\draw (5dot3) -- (6);
\end{tikzpicture}
\end{document}
期待更多富有创意的解决方案!