答案1
使用 Tik 即可实现是使用mindmaps
库。但您必须手动绘制第一级节点之间的连接:
\documentclass[tikz]{standalone}
\usetikzlibrary{mindmap,backgrounds}
\begin{document}
\begin{tikzpicture}[mindmap,concept color=black]
\node[concept,fill=blue!30] (A) at (0,0) {A}
child[grow=200] {node[concept,fill=blue!20] (Aa) {a}}
child[grow=240] {node[concept,fill=blue!20] (Ab) {b}};
\node[concept,fill=red!30] (B) at (5,5) {B}
child[grow=20] {node[concept,fill=red!20] (Ba) {a}}
child[grow=160] {node[concept,fill=red!20] (Bb) {b}};
\node[concept,fill=green!30] (C) at (10,0) {C}
child[grow=340] {node[concept,fill=green!20] (Ca) {a}}
child[grow=300] {node[concept,fill=green!20] (Cb) {b}};
\path
(A) to[circle connection bar] (B)
(B) to[circle connection bar] (C)
(A) to[circle connection bar] (C);
\end{tikzpicture}
\end{document}
答案2
这个论坛上有很多解决方案,例如这里,仅需进行少量修改。
\documentclass[tikz]{standalone}
\usetikzlibrary{mindmap}
\pagestyle{empty}
\begin{document}
\def\colorLeft{green!50!yellow!70!red!30!blue}
\def\colorRight{orange}
\def\colorTop{red!80!blue!80}
\begin{tikzpicture}[small mindmap, outer sep=0pt, text=black]
% from https://tex.stackexchange.com/a/144828/121799
\begin{scope}[concept color=\colorRight]
\node (right) at (-30:3) [concept] {Right}
[clockwise from=0]
child { node[concept] {R.1} }
child { node[concept] {R.2} }
;
\end{scope}
\begin{scope}[concept color=\colorLeft]
\node (left) at (210:3) [concept] {Left}
[counterclockwise from=180]
child { node[concept] {L.1} }
child { node[concept] {L.2} }
;
\end{scope}
\begin{scope}[concept color=\colorTop]
\node (top) at (90:3) [concept] {Top}
[counterclockwise from=53]
child { node[concept] {T.1} }
child { node[concept] {T.2} }
;
\end{scope}
\path (left) to[circle connection bar switch color=from (\colorLeft) to (\colorRight)] (right) ;
\path (left) to[circle connection bar switch color=from (\colorLeft) to (\colorTop)] (top) ;
\path (top) to[circle connection bar switch color=from (\colorTop) to (\colorRight)] (right) ;
\end{tikzpicture}
\end{document}