多个思维导图,如何确定子思维导图的范围并进行正确的移动/定位?

多个思维导图,如何确定子思维导图的范围并进行正确的移动/定位?

我想制作一张包含多张思维导图的海报。每张思维导图都是课程的一个讲义,所以我最终想将 8 张独立的思维导图放置在一张海报中,就像下面这张一样。

小地图海报

我对目前的组织并不满意,感谢@Schrodingers cat思维导图,growcyclic 来自哪里?我设法以更大的灵活性来旋转更加圆形和和谐的思维导图。 在此处输入图片描述

我将每张思维导图都放在一个范围内。但是,正如您在下面的简化 MWE 中看到的,范围并不是将思维导图作为一个块进行移动(保持其在块中的圆形排列),而只是移动中心节点。

我的问题似乎与为什么缩放 tikz 图片会导致变换画布范围内的所有内容消失? 但从那时起 :/

在此处输入图片描述

    \documentclass[tikz,border=9]{standalone}
\usetikzlibrary{mindmap,decorations}
\usepackage{xspace}

\makeatletter
\newcount\tikzcountgrandchild
\def\tikz@grow@concentric{%
  \pgftransformreset% 
  \pgftransformrotate{\pgfkeysvalueof{/tikz/overall rotation}+(\pgfkeysvalueof{/tikz/sibling angle})*(\tikzcountgrandchild)}%
  \ifnum\tikztreelevel=1
    \pgftransformrotate{(\pgfkeysvalueof{/tikz/sibling angle})*(\pgfkeysvalueof{/tikz/noc}-1)/2}%
  \fi
  \pgftransformxshift{\the\tikzleveldistance}%
  \ifnum\tikztreelevel=2
    \global\advance\tikzcountgrandchild by1
 \fi
}

\begin{document}
\tikzset{overall rotation/.initial=0,
    noc/.initial=0,
    branch color/.style={
        concept color=#1!white,
        every child/.append style={concept color=#1!white!30!white},
    }
}

\begin{tikzpicture}
    \begin{scope}[text width=1.5cm,align=flush center,
            mindmap,growth function=\tikz@grow@concentric,
            overall rotation=-45,
            sibling angle=360/30,
            nodes={concept},
            concept color=green!70!black,
            root concept/.append style={ ball color=green!50, line width=1.5ex,text=green!40!black,font=\huge\bfseries\scshape,minimum size=4.5cm,text width=4.5cm,},                   
            level 1/.style={,level distance=8cm,font=\Large,minimum size=3.0cm,text width=2.5cm,},
            level 2/.style={level distance=12cm,font=\large,minimum size=2.0cm,text width=2.0cm}
        ]
        \node [root concept]{Clients} 
        child[noc=3,branch color=green!70]{node {Retail} 
            child[] {node {CGPI}} 
            child[] {node {Banques priv\'ees}} 
            child[] {node {Retail banking}} 
        }
        child[noc=3,branch color=green!70]{node {ALM} 
            child[] {node {Mutuelles}} 
            child[] {node {Assurances}} 
            child[] {node {Caisse de retraite}}         
        } 
        child[noc=1,branch color=green!80]{node {Directions financi\'eres} 
            child[] {node {Corporate}} 
        } 
        child[noc=3,branch color=green!70]{node {Instrument specialists} 
            child {node {Asset Managers traditionnels}} 
            child {node {Hedge funds}} 
            child {node {Trading desks form other banks}} 
        } 
        ;
    \end{scope}

    \begin{scope}[xshift=-5cm,text width=1.5cm,align=flush center,
            mindmap,growth function=\tikz@grow@concentric,
            overall rotation=45,
            sibling angle=360/30,
            nodes={concept},
            concept color=yellow!70!black,
            root concept/.append style={ ball color=yellow!50, line width=1.5ex,text=yellow!40!black,font=\huge\bfseries\scshape,minimum size=4.5cm,text width=4.5cm,},                   
            level 1/.style={,level distance=8cm,font=\Large,minimum size=3.0cm,text width=2.5cm,},
            level 2/.style={level distance=12cm,font=\large,minimum size=2.0cm,text width=2.0cm}
        ]
        \node [root concept]{Suppliers} 
        child[noc=3,branch color=yellow!70]{node {Retail} 
            child[] {node {CGPI}} 
            child[] {node {Banques priv\'ees}} 
            child[] {node {Retail banking}} 
        }
        child[noc=3,branch color=yellow!70]{node {ALM} 
            child[] {node {Mutuelles}} 
            child[] {node {Assurances}} 
            child[] {node {Caisse de retraite}}         
        } 
        child[noc=1,branch color=yellow!80]{node {Directions financi\'eres} 
            child[] {node {Corporate}} 
        } 
        child[noc=3,branch color=yellow!70]{node {Instrument specialists} 
            child {node {Asset Managers traditionnels}} 
            child {node {Hedge funds}} 
            child {node {Trading desks form other banks}} 
        } 
        ;
    \end{scope}

\end{tikzpicture}
\end{document}

Cat 解决方案已经帮助我制作了这个可改进的解决方案 在此处输入图片描述

答案1

和之前一样,问题出在\pgftransfromreset。作为第一个建议,我添加了两个键overall xshiftoverall yshift来解决这个问题。它们可以分别使用Xshift和与普通移位键组合使用Yshift

\documentclass[tikz,border=9]{standalone}
\usetikzlibrary{mindmap,decorations}
\usepackage{xspace}

\makeatletter
\newcount\tikzcountgrandchild
\def\tikz@grow@concentric{%
  \pgftransformreset%
  \pgftransformshift{\pgfpoint{\pgfkeysvalueof{/tikz/overall xshift}}{\pgfkeysvalueof{/tikz/overall yshift}}}% 
  \pgftransformrotate{\pgfkeysvalueof{/tikz/overall rotation}+(\pgfkeysvalueof{/tikz/sibling angle})*(\tikzcountgrandchild)}%
  \ifnum\tikztreelevel=1
    \pgftransformrotate{(\pgfkeysvalueof{/tikz/sibling angle})*(\pgfkeysvalueof{/tikz/noc}-1)/2}%
  \fi
  \pgftransformxshift{\the\tikzleveldistance}%
  \ifnum\tikztreelevel=2
    \global\advance\tikzcountgrandchild by1
 \fi
}

\begin{document}
\tikzset{overall rotation/.initial=0,
    overall xshift/.initial=0pt,
    overall yshift/.initial=0pt,
    Xshift/.style={xshift=#1,overall xshift=#1},
    Yshift/.style={yshift=#1,overall yshift=#1},
    noc/.initial=0,
    branch color/.style={
        concept color=#1!white,
        every child/.append style={concept color=#1!white!30!white},
    }
}

\begin{tikzpicture}
    \begin{scope}[text width=1.5cm,align=flush center,
            mindmap,growth function=\tikz@grow@concentric,
            overall rotation=-45,
            sibling angle=360/30,
            nodes={concept},
            concept color=green!70!black,
            root concept/.append style={ ball color=green!50, line width=1.5ex,text=green!40!black,font=\huge\bfseries\scshape,minimum size=4.5cm,text width=4.5cm,},                   
            level 1/.style={,level distance=8cm,font=\Large,minimum size=3.0cm,text width=2.5cm,},
            level 2/.style={level distance=12cm,font=\large,minimum size=2.0cm,text width=2.0cm}
        ]
        \node [root concept]{Clients} 
        child[noc=3,branch color=green!70]{node {Retail} 
            child[] {node {CGPI}} 
            child[] {node {Banques priv\'ees}} 
            child[] {node {Retail banking}} 
        }
        child[noc=3,branch color=green!70]{node {ALM} 
            child[] {node {Mutuelles}} 
            child[] {node {Assurances}} 
            child[] {node {Caisse de retraite}}         
        } 
        child[noc=1,branch color=green!80]{node {Directions financi\'eres} 
            child[] {node {Corporate}} 
        } 
        child[noc=3,branch color=green!70]{node {Instrument specialists} 
            child {node {Asset Managers traditionnels}} 
            child {node {Hedge funds}} 
            child {node {Trading desks form other banks}} 
        } 
        ;
    \end{scope}

    \begin{scope}[Xshift=-5cm,text width=1.5cm,align=flush center,
            mindmap,growth function=\tikz@grow@concentric,
            overall rotation=45,
            sibling angle=360/30,
            nodes={concept},
            concept color=yellow!70!black,
            root concept/.append style={ ball color=yellow!50, line width=1.5ex,text=yellow!40!black,font=\huge\bfseries\scshape,minimum size=4.5cm,text width=4.5cm,},                   
            level 1/.style={,level distance=8cm,font=\Large,minimum size=3.0cm,text width=2.5cm,},
            level 2/.style={level distance=12cm,font=\large,minimum size=2.0cm,text width=2.0cm}
        ]
        \node [root concept]{Suppliers} 
        child[noc=3,branch color=yellow!70]{node {Retail} 
            child[] {node {CGPI}} 
            child[] {node {Banques priv\'ees}} 
            child[] {node {Retail banking}} 
        }
        child[noc=3,branch color=yellow!70]{node {ALM} 
            child[] {node {Mutuelles}} 
            child[] {node {Assurances}} 
            child[] {node {Caisse de retraite}}         
        } 
        child[noc=1,branch color=yellow!80]{node {Directions financi\'eres} 
            child[] {node {Corporate}} 
        } 
        child[noc=3,branch color=yellow!70]{node {Instrument specialists} 
            child {node {Asset Managers traditionnels}} 
            child {node {Hedge funds}} 
            child {node {Trading desks form other banks}} 
        } 
        ;
    \end{scope}

\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容