子节点放置 TiKZ Mindmap

子节点放置 TiKZ Mindmap

第一个子概念(Lily Briscoe)位于左下角,但应该出现在顶部。其余子概念应按顺时针方向排列。有没有一种简单的方法可以从顶部开始旋转子概念?

[从 -90 顺时针增长] 毁了一切。 一个相对于根旋转子节点的代码就足够了。

\documentclass{article}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french,english,russian]{babel}
\usepackage{cmap}
\usepackage{hyperxmp}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\usepackage[landscape,left=0.1cm, right=.1cm, top=0.1cm, bottom=.1cm,paperwidth=7in,paperheight=9in]{geometry}

\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{calc}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{mindmap}

\newcommand{\myhref}[2]{\selectlanguage{french}\textcolor{blue}{\href{#1}{\selectlanguage{russian}\textcolor{blue}{#2}}}\selectlanguage{russian}}

\hypersetup{%
pdftitle={%
To the Lighthouse. Mindmap},
pdfauthor={Vitaly Repin},
pdfcopyright={This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License},
pdfsubject={To the Lighthouse by Virginia Woolf. Mindmap.},
pdfkeywords={modern,postmodern,woolf,lighthouse},
pdflicenseurl={http://creativecommons.org/licenses/by-sa/3.0/},
pdfcaptionwriter={Vitaly Repin},
pdfcontactcity={Espoo},
pdfcontactcountry={Finland},
pdfcontactemail={[email protected]},
pdflang={en}
}

\definecolor{historybg}{HTML}{D7DBDF}
\definecolor{historyfg}{HTML}{77797C}
\definecolor{scibg}{HTML}{EEEEEE}

\begin{document}

\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\begin{center}
\resizebox{!}{.93\textheight}{\begin{tikzpicture}[mindmap,
every node/.style={concept,execute at begin node=\hskip0pt},
root concept/.append style={
concept color=black, fill=white, line width=1ex, text=black,minimum size=3cm,text width=3cm,font=\large\scshape},
text=historyfg,
concept color=historybg,grow cyclic,
level 1/.append style={level distance=3.7cm,sibling angle=90},
level 2/.append style={level distance=3cm,sibling angle=45},
level 3/.append style={level distance=2.3cm,sibling angle=45},
remark/.style={
rectangle,
sloped,
minimum size=4mm,
very thin,
color=white,
text=black,
font=\itshape
}]
\node[root concept] (root) {To the Lighthouse (1927)}
  child [concept color=scibg,text=black] { node {Lily Briscoe}
    child [concept] { node {Painter}}
    child [concept] { node {Difficulties with men}}
    child [concept] { node {What is the appropriate distance?}
        child [concept] { node {Painterly problem}}
        child [concept] { node {Human problem}}}
  }
  child [concept] { node {Charles Tansley}
    child [concept] { node {Proud to be lower-class person}}
    child [concept] { node {Enlighten\-ment figure}}
    child [concept] { node {Hard worker}}
    child [concept] { node {\textsl{Little} atheist}}
    child [concept] { node {Criticizes everything}}
  }
  child [concept color=scibg,text=black,level distance=4.3cm,sibling angle=85] { node (mr) {Mr Ramsay}
    child [concept] { node {Trying to understand the world}
        child [concept] { node (epi) {Episte\-mology}}
        child [concept] { node (onto) {Ontology}}
        child [concept] { node (an) {Analytical philo\-sopher}}
    }
    child [concept,sibling angle=56,level distance=3.2cm] { node {Loved and hated} }
    child [concept,sibling angle=15] { node {Monster of knowledge }}
    child [concept,sibling angle=30,level distance=2.8cm] {node (talk) {Talks}}
    }
  child [concept,sibling angle=95,level distance=4.3cm] { node (mrs) {Mrs Ramsay}
    child [concept,level distance=3.6cm] { node (feel) {Feels} }
    child [concept] { node {Connects people} }
    child [concept] {node {Eros, combinatory force}}
    child [concept] {node {World maker}}
    child [concept] {node {Beautiful}}
  };
\end{tikzpicture}}
\end{center}
\bigskip

\centerline{\small \copyright\ Vitaly Repin, 2013. This work is licensed under a \myhref{http://creativecommons.org/licenses/by-sa/3.0/}{Creative Commons Attribution-ShareAlike 3.0 Unported License.}}

\end{document}

来源:https://github.com/vitalyrepin/Modern2013/tree/master/LightHouseMap

这是代码的输出: 在此处输入图片描述

但如果我们添加[clockwise from -90]后,\node[root concept] (root) {To the Lighthouse (1927)}我们得到: 在此处输入图片描述

答案1

我不知道是否有一条独特的指令可以按照您的意图旋转所有节点,但只需[clockwise from=xx]在每个父节点后插入适当的节点即可轻松解决该问题。

还要注意,如果您想要将节点“Lily Briscoe”置于顶部,则必须写入[clockwise from=90]not [clockwise from=-90]

\documentclass{article}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french,english,russian]{babel}
\usepackage{cmap}
\usepackage{hyperxmp}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\usepackage[landscape,left=0.1cm, right=.1cm, top=0.1cm, bottom=.1cm,paperwidth=7in,paperheight=9in]{geometry}

\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{calc}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{mindmap}

\newcommand{\myhref}[2]{\selectlanguage{french}\textcolor{blue}{\href{#1}{\selectlanguage{russian}\textcolor{blue}{#2}}}\selectlanguage{russian}}

\hypersetup{%
    pdftitle={%
        To the Lighthouse. Mindmap},
    pdfauthor={Vitaly Repin},
    pdfcopyright={This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License},
    pdfsubject={To the Lighthouse by Virginia Woolf. Mindmap.},
    pdfkeywords={modern,postmodern,woolf,lighthouse},
    pdflicenseurl={http://creativecommons.org/licenses/by-sa/3.0/},
    pdfcaptionwriter={Vitaly Repin},
    pdfcontactcity={Espoo},
    pdfcontactcountry={Finland},
    pdfcontactemail={[email protected]},
    pdflang={en}
}

\definecolor{historybg}{HTML}{D7DBDF}
\definecolor{historyfg}{HTML}{77797C}
\definecolor{scibg}{HTML}{EEEEEE}

\begin{document}

    \pgfdeclarelayer{background}
    \pgfsetlayers{background,main}
    \begin{center}
        \resizebox{!}{.93\textheight}{\begin{tikzpicture}[mindmap,
            every node/.style={concept,execute at begin node=\hskip0pt},
            root concept/.append style={
                concept color=black, fill=white, line width=1ex, text=black,minimum size=3cm,text width=3cm,font=\large\scshape},
            text=historyfg,
            concept color=historybg,grow cyclic,
            level 1/.append style={level distance=3.7cm,sibling angle=90},
            level 2/.append style={level distance=3cm,sibling angle=45},
            level 3/.append style={level distance=2.3cm,sibling angle=45},
            remark/.style={
                rectangle,
                sloped,
                minimum size=4mm,
                very thin,
                color=white,
                text=black,
                font=\itshape
            }]
            \node[root concept] (root) {To the Lighthouse (1927)}
            [clockwise from=90] 
            child [concept color=scibg,text=black] { node {Lily Briscoe}
                [clockwise from=135]
                child [concept] { node {Painter}}
                child [concept] { node {Difficulties with men}}
                child [concept] { node {What is the appropriate distance?}
                    [clockwise from=60]
                    child [concept] { node {Painterly problem}}
                    child [concept] { node {Human problem}}}
            }
            child [concept] { node {Charles Tansley}
                [clockwise from=90]
                child [concept] { node {Proud to be lower-class person}}
                child [concept] { node {Enlighten\-ment figure}}
                child [concept] { node {Hard worker}}
                child [concept] { node {\textsl{Little} atheist}}
                child [concept] { node {Criticizes everything}}
            }
            child [concept color=scibg,text=black] { node (mr) {Mr Ramsay}
                [clockwise from=-23]
                child [concept] { node {Trying to understand the world}
                    [clockwise from=10]
                    child [concept] { node (epi) {Episte\-mology}}
                    child [concept] { node (onto) {Ontology}}
                    child [concept] { node (an) {Analytical philo\-sopher}}
                }
                child [concept] { node {Loved and hated} }
                child [concept] { node {Monster of knowledge }}
                child [concept] {node (talk) {Talks}}
            }
            child [concept] { node (mrs) {Mrs Ramsay}
                [clockwise from=-90]
                child [concept] { node (feel) {Feels} }
                child [concept] { node {Connects people} }
                child [concept] {node {Eros, combinatory force}}
                child [concept] {node {World maker}}
                child [concept] {node {Beautiful}}
            };
            \end{tikzpicture}}
    \end{center}
    \bigskip

    \centerline{\small \copyright\ Vitaly Repin, 2013. This work is licensed under a \myhref{http://creativecommons.org/licenses/by-sa/3.0/}{Creative Commons Attribution-ShareAlike 3.0 Unported License.}}

\end{document}

在此处输入图片描述

相关内容